Results 1 to 4 of 4

Thread: Exit

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Posts
    143
    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

  2. #2
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    Console apps wil terminate if you return 0 in the main() function.
    Code:
    int main()
    {
    //code
    return 0; //exit
    }
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  3. #3
    Guest
    In Windows apps, use the PostQuitMessage() function.
    Code:
    PostQuitMessage(0);

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Posts
    143
    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
  •  



Click Here to Expand Forum to Full Width