need some quick help (c++ segmentation fault)

Nyap

HTML Noob
OP
Banned
Joined
Jan 13, 2016
Messages
971
Trophies
0
Age
55
Location
That Chaos Site
XP
483
Country
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

General chit-chat
Help Users
  • No one is chatting at the moment.
    Xdqwerty @ Xdqwerty: good night