In the code below. I believe I am returning the memory location of the value I am looking for. How can get the value?
main.cpp
1 2 3 4 5 6
int choice = 0;
PlayerMenu *newPM = new PlayerMenu;
File *file = new File;
// Menu for loading, creating or exiting the game
choice = newPM->menuChoices();
Yes, it's printing out what is getting captured in the debug. Inside the function it still have the int "1" which is what I have been choosing. However, when it gets returned to the main loop it is printing out. 1380172400
from inside the function choice1 holds 1 and when it gets put into choice in "Int main" it gets changed to 1380172400
I also realized I didn't need to check for choice 3 because the loop automatically stops if the value of choice is = to 3. So I was able to condense it some. thanks for your help. I must have looked at that like 50 times and missed it.
Actually Disch told you to remove the break, not change its place. If function returns some value, it automatically stops, so you don't need to exit the loop by break. This instruction will never be reached.