分页: 1 / 1

g++编译问题,求助

发表于 : 2011-04-18 18:05
xpnlxy
最简单的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

Re: g++编译问题,求助

发表于 : 2011-04-18 18:07
灰色小狼
#include <iostream>

Re: g++编译问题,求助

发表于 : 2011-04-18 18:12
ouch_ouch
灰色小狼 写了:#include <iostream>
好不容易有我能够回答的问题。。。

Re: g++编译问题,求助

发表于 : 2011-04-18 18:16
灰色小狼
ouch_ouch 写了:
灰色小狼 写了:#include <iostream>
好不容易有我能够回答的问题。。。
下手就要快、稳、恨、准 :em04

Re: g++编译问题,求助

发表于 : 2011-04-18 18:32
xpnlxy
想不到是这样

Re: g++编译问题,求助

发表于 : 2011-04-18 18:40
灰色小狼
这事没啥想到想不到的,一旦知道以后就不会错了 :em05

Re: g++编译问题,求助

发表于 : 2011-05-25 11:01
123662981
ouch_ouch 写了:
灰色小狼 写了:#include <iostream>
好不容易有我能够回答的问题。。。
呵呵,是呀是呀,在论坛逛这么久都是些高端的问题,我也是菜鸟

Re: g++编译问题,求助

发表于 : 2011-05-31 8:17
rediscover
我是来测试语法高亮的。
[cpp]#include <iostream>
using namespace std;

int main()
{
cout << "helloworld";
return 0;
}[/cpp]

Re: g++编译问题,求助

发表于 : 2011-06-08 12:55
lifulinghan

代码: 全选

#include <iostream>
using namespace std;

int main()
{
cout << "helloworld";
return 0;
}


怎么用高亮显示呀