g++编译问题,求助
发表于 : 2011-04-18 18:05
最简单的helloworld编译出错,请问这是什么原因?
include<iostream>
using namespace std;
int main()
{
cout << "helloworld";
return 0;
}
编译提示:
test.cpp:1: error: expected constructor, destructor, or type conversion before '<' token
test.cpp: In function int main()
test.cpp:6: error: 'cout' was not declared in this scope
include<iostream>
using namespace std;
int main()
{
cout << "helloworld";
return 0;
}
编译提示:
test.cpp:1: error: expected constructor, destructor, or type conversion before '<' token
test.cpp: In function int main()
test.cpp:6: error: 'cout' was not declared in this scope