i am a new programmer in visual studio (using the 2008 version)
i have 2 questions.. maybe someone can help me with them..
-
when running my program, it prints allot of things, it opens the cmd windos, and then closes it right away. how do i get that window to stay open and not close?
-
i want to save the out put to a file. i want to redirect the output from the program automaticly into a txt file. how do i do that?
i know that i can do it through the cmd window using sone kind of ‘<‘ command .. but i need to use visual studios compiler (not gcc/g++) is there a way to get the output to a file?
About the first question, I myself had trouble with that. I don’t have a real solution, but I simply put:
at the end of the program, thus causing the window not to close until I type a number.