# Thread: No Result when run *.exe

1. ## 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?

2. > I cannot get the result.
Does this mean
- program crash?

A more modern compiler would be a good idea as well, if you want to do anything more than just print stuff to the screen.

3. 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.

4. Hai.....sorry i am a little confuse with the replies given.........The source code is as below.........

Code:
#include <stdio.h>
#include <dos.h>

int main()
{
int i;
unsigned char far* scrn = (unsigned char far*) 0xb0008000;
FILE *fp = fopen("c:\\text.txt","w");

for(i=0;i<6900;i+=2)
fputc(*(scrn+i),fp);

fclose(fp);

return 0;
}
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?

5. Hai.......Thanks for all the support. I have found out the problem. It is not compatible with Win2K dos prompt. When I use another computer with Win98. The program runs well.

Thanks.

6. Of course it isn't. You can't just grab any random point in memory on an NT machine and expect it to let you. For one thing, NT doesn't have DOS.

Oh, and it's your own fault you didn't get a better answer. You didn't mention your OS any place except in your last note.

Quzah.

7. See, this is the kind of moronic thing which happens when you run some ancient fossil like TurboC on a new operating system.

Man, there are just so many losers on the board at the moment with dumb-ass TurboC questions. Get with the program people!!!!!