Native' has exited with code 0 (0x0)

This topic is 3201 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

any ideas why after debugging a program I'd get this ' Native' has exited with code 0 (0x0)'? I've never seen it before any ideas?

Share on other sites
I don't think it's anything to be alarmed about, I get it all the time when the program I'm debugging ends. Although it usually shows the PID and process name like "'[1234] Foo.exe: Native' have exited with code 0 (0x0)'" as well, not just an empty space. At any rate, I wouldn't worry, it's just helpful debugger output. It also prints a similar message when threads terminate.

Share on other sites
alright but it is something to worry about for me because my program randomly crashes when it gets to the spot where it's supposed to be an that is when I get the error also I keep on getting a C4700 Warning

Share on other sites
That means, nominally, that everything went well and the thread exited correctly.

Post the exact code (and its immediate environment) that the C4700 points to, since that might well be the source of your problem. C4700 is use of a variable before assignment.

Share on other sites
Quote:
 Original post by ARC incalright but it is something to worry about for me

Don't. All it means is that the program exited (like all programs eventually do), and returned a status code of 0 (either by returning it from main(), not returning and reaching the end of main(), or by calling exit(0)). Zero typically means 'success', non-zero typically means some kind of error.

Quote:
 because my program randomly crashes when it gets to the spot where it's supposed to be an that is when I get the error also I keep on getting a C4700 Warning

This is more relevant, on the other hand. It's worth pointing out that most of us don't have each error code memorized -- it's a good idea to post full error messages instead of making people look the message type up. It makes it easier to help, which in turn usually means more people willing to help.

Share on other sites
if(option ==1){p->new_game();}

this is where I am getting my C4700 error it says p was local an not initlized but I have Game *p; which points to my Game class/functions an I have no idea why it is doing this to me. Someone also told me my pointer is going to garbage varibles would this have something to do with it? because the pointer I am using for this little part goes to a new_game function which creates a account.dat file for loading the game.

Share on other sites
*facepalm*

Yes. "Game *p;" declares a pointer. It does not initialize the pointer. Trying to use a pointer that isn't set to point at anything specific will at best crash.

Try this:
Game *p = new Game();

Or better yet, consider avoiding pointers entirely:
Game mygame;...if(option ==1){mygame.new_game();}

Share on other sites
Quote:
 Original post by ARC inc *** Source Snippet Removed ***this is where I am getting my C4700 error it says p was local an not initlized but I have Game *p;

So, let's see what I told you last time:

Quote:
 Most likely, you have something like this:Game* game; // on a previous linegame->new_game(); // line 16

Wow, what do you know, I was right. OK, I wasn't able to guess the name of your variable, and called it 'game' instead of 'p'. But other than that I'm batting 1.000 so far.

Quote:
 an I have no idea why it is doing this to me.

Well, what did I say about the situation last time? Let's see:

Quote:
 You cannot just do this. It's equivalent to saying "paint that house", while not actually pointing at a house (or doing anything else to indicate which house you mean).There is no reason why you should want to do this, anyway. You do not require pointers to use instances of classes. Classes simply define data types, and you can use their instances just like you use primitives: i.e., by value.Thus:Game game; // on a previous line; actually creates a gamegame.new_game(); // uses the game without any need to "point at" itwhich is like saying "build a house and then paint it".

Did you not actually read that? Or is there something you still don't understand? Because I really can't think of any way to explain it any more simply.

Share on other sites
I didn't see your response, this topic went off topic an went back to this direction lol but I did get it fixed thank you to all for help.

1. 1
2. 2
3. 3
Rutin
13
4. 4
5. 5

• 26
• 11
• 9
• 9
• 11
• Forum Statistics

• Total Topics
633700
• Total Posts
3013420
×