|
-
Feb 16th, 2001, 02:34 PM
#1
Thread Starter
Addicted Member
Hello.
Is there a function that allows me to kill my program thats running.
For example if I put a certain code in the module it will kill the program.
Vb has unload me.
Im look for that type of function in C.
Thanks
-
Feb 16th, 2001, 03:22 PM
#2
Frenzied Member
Console apps wil terminate if you return 0 in the main() function.
Code:
int main()
{
//code
return 0; //exit
}
-
Feb 16th, 2001, 03:47 PM
#3
In Windows apps, use the PostQuitMessage() function.
Code:
PostQuitMessage(0);
-
Feb 16th, 2001, 04:22 PM
#4
Thread Starter
Addicted Member
Thanks alot Megatron & Vlatko.
Exactly what I needed to know 
Another thing.
I know C all the way up to pointer , arrays, structs, enums, and etc.
But Istill do not know what to use it for.
How do I get about making say linux apps or coding for some open source applications.
Or even if I want to write my own drivers or check system stats ?
How do I go about doing this or learning this.?
I feel like all this C is really useless right now. 
Any thoughts would help ;
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|