|
|
看大家都尝鲜过了
看看大家的感受
然后选择一个
目前使用的10.1
还行
不过
*.c *.cpp
经常编译不了
比如下面这段程序
从网上下载的
很多网上都有
很初级的
#include <iostream>
void main(void)
{
cout<<"Hello, world!"<<endl;
}
运行
g++ -o hello hello.C
后,提示:
hello.C:5: error: stray ‘\343’ in program
hello.C:5: error: stray ‘\200’ in program
hello.C:5: error: stray ‘\200’ in program
hello.C:3: error: ‘::main’ must return ‘int’
hello.C: In function ‘int main()’:
hello.C:5: error: ‘cout’ was not declared in this scope
hello.C:5: error: ‘endl’ was not declared in this scope
无法编译,这是怎么回事情啊? |
|