Gcc problems under HP system

ÀîºÆÃ÷ lihaoming2000@21cn.com
Thu Oct 18 20:12:00 GMT 2001


I compiled this program under HP 11.00 9000/785 system ,with gcc 3.0.There's neither error nor warning during the compile process.But when I ran it,Segmentation fault happened and the program terminated.
 
Here is the program:
#include <stdio.h>
#include <string>
using namespace std;
 
class mapnode     
{
 string srcName,desName;
};
 
int main()
{
 fprintf(stderr,"Before mapnode constructor\n");
 mapnode a[2000];
 fprintf(stderr,"Mapnode constructor accomplished\n");
 return 1;
}
 
And my compile option: g++ main.cpp
------------------------------------------------
21CNÍøÂç²úÆ·³ÏÕ÷´úÀí
http://agent.21cn.com
ÏëÃâÊÜ¹ã¸æÐŵÄɧÈÅ£¬ÇëÂíÉÏÉý¼¶Îª21CN¾­¼ÃÓÊÓû§¡£
http://news.21cn.com/cgibin/urlhit2-mcounter.php3?url=http://member.21cn.com/economy/upgrade.php&rd=1
²»¿´ÊÇÄãµÄ´í£¬²»ÔÙ¿´ÊÇÎÒµÄ´í¡£
http://adinfo.21cn.com





More information about the Gcc-help mailing list