Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Name: IVO Date: March 26, 2009 at 03:41:39 Pacific
Reply:
If you embed your C executable in a script , e.g. a batch, you can check the return code to keep track of program execution; see the following Cprog /T HostName if not errorlevel 1 echo Connection established
where Cprog.exe returns 0 if no failure occurred while running, otherwise a return code greater or equal to 1 is posted.
The return code can be inspected in case of running the program inside another one, see the C system() function.
Main's return code is the legacy of your just ended run leaving you a message about what happened.
0
Response Number 2
Name: sandipkalle Date: April 14, 2009 at 04:26:23 Pacific
Reply:
The basic purpose of returning any value from any function is to check that is that function executed successfully or not. If your functions executed successfully return 0 or for exception return 1. this can be handled by try...cattch . Finally main() is also a function for system calls from where program is start to execute. Suppose you calling this exe in another application... it will useful to check that, this program executed properly or not.
Summary: Please, can anyboby help me with the problem in this simple C program ? After running, I can answer just the first question. The second question comes with "R=1" in front of the word "Aswer:". PLEASE ...
Summary: Hi. I'm in a very basic C Programming class. Its defanatly for beginners so this probably will be an easy question. I have my program set as follows....The user enters 10 names into a character array ...
Summary: Hi everyone, I am new to Linux mandrake7.1, My simple C++ program shown below give errors when compile #include void main() { cout <<"HI";//ERROR undefined reference } ***************ERROR SHOW ...