当前位置:编程学习 > C/C++ >>

visual c++为什么出现4个error?

补充:
#include<stdio.h>
int main(void)
{
printf("This is a biography, 
    who wrote the isaacson.\n");
}
追问:换行不是斜线+N吗?怎么又变成只有一个斜线了?
答案:#include<stdio.h>
int main(void)
{
    printf("This is a biography, \
        who wrote the isaacson.\n");

    return(0);
}

这样就没有错误了。
main函数是int,必须返回一个值。

如果一行没有写完要换行的话,必须在上一行的末尾添加连接符   \ 

否则,编译器认为是新的一行开始了

上一个:C++制表符"\t”的用法
下一个:期待c或c++高手解决

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,