View Single Post
Old 10-14-2004, 09:22 AM   #6 (permalink)
TheAgent
Upright
 
Quote:
Originally Posted by zero2
Thanks for the help, my professor, makes our class use programs that already work, and we use that to make changes, sort of like using a template.

So here's what I did, I created a new c++ project, then picked win32, called the file test.c (since I want it to be a c file)

I next right clicked source files, and I added an existing file called asterick.c file as seen above in screenshot. I then built the solution had no errors, linked the file no errors, however, when I went to execute the program, the command prompt flashes really quick, and Im back to visual studio, with the error saying the program [3392] test.c.exe, Native has exited with code 0 (0X0).

In theory the program should work, however, it's not executing, what am I doing wrong?

sounds like you dont have anything at the end of the program to halt the execution and wait for the user to close it... so as soon as it finishes, it closes... "Code 0" typically means that the program completed execution normally...

getch(); would do the trick
TheAgent is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76