Original Post
Hi, I was having a problem with my program crashing after main did its: return 0; I realise this is because of some dodgy code I'd written, but I managed to 'eliminate' the problem by doing this: TerminateProcess(GetCurrentProcess(),0); I get the feeling this is a really bad idea, but I don't actually know why. (Is it?) Would anyone be able to explain what the difference between:
int main(int argc, char *argv[]) {
return 0;
}
//and
int main(int argc, char *argv[]) {
TerminateProcess(GetCurrentProcess(),0);
return 0; //doesn't get executed
}
is? Thanks! // edit - added some white space to the title