No Result when run *.exe

This is a discussion on No Result when run *.exe within the C Programming forums, part of the General Programming Boards category; Hello. I have this problem. When I compile a project in the turbo C compiler I can get the result ...

No Result when run *.exe

Hello. I have this problem. When I compile a project in the turbo C compiler I can get the result that I want. But after I compile it and make it into an exe, then run that exe, I cannot get the result. Why is it when I run in the project file the result is there but not after it is an exe?

I think "the result" means the source code. So when you open a project file, the source code is visible, but not when you open an exe. Well, that's how it is. I used to back up my exes but now I don't, because the source files are more valuable.

"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell

When I press Alt+F9, I get the text.txt with the information on the dos screen. Now I have tested. If I open the dos prompt and straight away type the exe Eg: C:\Scrncap.exe, I won't get the output in the c:\text.txt. The file exist but contains nothing inside. But if I open the turbo C compiler, then close it back again. And then type the exe Eg: C:\scrncap.exe, I get the output of the dos screen in the c:\text.txt. This is the part I really don't understand. Why in a newly open dos prompt I cannot capture the text in the c:\text.txt?