Hello people
I have jusrt recently started to study C/C++ and I am using Borland 5.02. I am having a problem examining my outputs. when I run a successfully compiled program the Dos window that I should read my print from flashes on then flashes off:'( and I do not get the time to examine the results. Can any body tell me how to adjust the settings in order to read it.
Thanks
Fazzer2

Put a std::cin.get() (C++) or : getchar() (C) right before the return 0; in main().

int main(){
   // do stuff
   std::cin.get();
   return 0;
}
Comments
didn't understand it at first, but I put that down to being a noob. I understand it now

Put a std::cin.get() (C++) or : getchar() (C) right before the return 0; in main().

int main(){
   // do stuff
   std::cin.get();
   return 0;
}

Thank you for the reply, but it does not seem to make any sense.
Is it all there? Is it relavent to the post about my DOS window not staying open to examine results
cheers
Fazzer2

Put a std::cin.get() (C++) or : getchar() (C) right before the return 0; in main().

int main(){
   // do stuff
   std::cin.get();
   return 0;
}

I think I have it. If I put
int ch;
ch = getc(stdin)
the window stays open

So exactly why didn't you try my code?

didn't understand it, but I do now
cheers

This question has already been answered. Start a new discussion instead.