This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Gcc problems under HP system


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]