Article View: cn.comp.os.linux
Article #10465Re: 下列代码在gcc2.96下编译没问题,而在gcc3.2.2下编译出错?
From: maddog
Date: Sat, 12 Jul 2003 10:12
Date: Sat, 12 Jul 2003 10:12
39 lines
3660 bytes
3660 bytes
"lgn" <liuguonnn@163.com> writes:
> �������ҵ�Դ���룬�����ָ��
> #include <cstdlib>
> #include <unistd.h>
> #include <list>
> #include <algorithm>
> #include <fstream>
>
// ��Ҫ����ƿռ�std
+ using namespace std;
> main(int argc,char ** argv) {
> list<long int> Series;
> int n;
>
> for(n=0; n<100; n++)
> Series.push_front(n);
> Series.sort();
> }
>
> ��gcc3.2.2����ʾ�Ĵ����ǣ�
> simple.c: In function `int main(int, char**)':
> simple.c:8: `list' undeclared (first use this function)
> simple.c:8: (Each undeclared identifier is reported only once for each
> function
> it appears in.)
> simple.c:8: parse error before `int'
> simple.c:12: `Series' undeclared (first use this function)
>
>
>
>
--
ǧ�����,�ڰ�ɫ����Ȼ��������!
ǧ������,��������Ľ�ʯ֮������������!
ǧ���ɣ,���±�Ǩ,������������Ͼ��Ķ��ǵ�˺ɱ,��ʿ���ĵ�ִ��,���С���Χ���Ų��������!
ǧ�����,�ľ���������,���������,
�����������ϵ�ǧ����,���������������Ҹ�,�Լ���ֱ����֮һ������ͣϢ����
Technical Details
Message-ID:
<u7k6om4ul.fsf@163.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!maily.cic.tsinghua.edu.cn!news.cn99.com!news.yaako.com!not-for-mailReferences:
<beohcp$m1q$1@mail.cn99.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,GB X-Google-Thread: 10b277,d5c99d1487184e15 X-Google-Attributes: gid10b277,public X-Google-ArrivalTime: 2003-07-12 03:10:30 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!maily.cic.tsinghua.edu.cn!news.cn99.com!news.yaako.com!not-for-mail From: maddog <maddog@163.com> Newsgroups: cn.comp.os.linux Subject: Re: 下列代码在gcc2.96下编译没问题,而在gcc3.2.2下编译出错? Date: Sat, 12 Jul 2003 18:12:02 +0800 Organization: Bentium Ltd. (CN99) Lines: 39 Message-ID: <u7k6om4ul.fsf@163.com> References: <beohcp$m1q$1@mail.cn99.com> NNTP-Posting-Host: 61.178.80.120 Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 8bit X-Trace: news.yaako.com 1058004577 8661 61.178.80.120 (12 Jul 2003 10:09:37 GMT) X-Complaints-To: usenet@news.yaako.com NNTP-Posting-Date: Sat, 12 Jul 2003 10:09:37 +0000 (UTC) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEX6+fL8//08LkDhz6Nm XXJSQ1uym3ohFRpw2NqWAAACf0lEQVR4nFXSQXfiIBAA4Fite21e+/bcxVCurWzjtbWQnJeC ua4hjtc+GjN/fwc0ee48L/IxA8wky/M7w5RigTmrYlSzPEaWwGoxgbqGwiBO8HIF3LDAR3gf ISdoGGWc19XbBHWCmKE1ZVUTHANLpVJopWf/ARvB8Qk2eAXOqf0EKYM5R7egM+zbBIxAMIGB titnPq4B4wupnnVWr0b4wZ2hq7IYWllrJ2DURdouelNsrbJudoEbxqxyFo69LQxXXO/HjEJV IKVsgypoBDx1Kz3wU6bogrY68CJ1K3a39mcog3UqBGc/xrafoexMoVRAZ+MQCe5ZPEAClC0B r426wEMBJCV0rump6W0zwkKoioqVXm0pAw4iTZfgVUgdYQ6aK1UC6mqf4MAAdnJOxYBbW/qg q78JtIHzIRKCLaRnbpfgTrME8WLoilI2xeAvsIPzS0BwXvqm7yHCfQQpn+OvYSfK6E9VhJ+a rbxPAHU4lV3dC/pMCbZm8JczjgRF3Tf6DNtBliOEA29ONU0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