need some quick help (c++ segmentation fault)

  • Thread starter Thread starter Nyap
  • Start date Start date
  • Views Views 783
  • Replies Replies 1
ok some more info
when I look at this line:
Code:
if(strcmp(argv[1],"DEBUG")==0)
and change the number in the subscipt in argv[HERE] the segfault seems to dissapear for some reason

edit: ok, I'm stupid. It's because when you didn't pass the "DEBUG" argument it would basically try and compare it to garbage, which is what caused the segmentation fault
 
Last edited by Nyap,

Site & Scene News

Popular threads in this forum