Closed Thread
Results 1 to 3 of 3

Thread: Main Function

  1. #1
    Hunter100 is offline Programming Professional
    Join Date
    Feb 2010
    Location
    Australia
    Posts
    289
    Rep Power
    0

    Question Main Function

    Hey all,

    I was wondering since there are Objects, Classes, Properties, Events and Methods and the like in OOP what is a main function, is that like

    Code:
    int main ()
    Also, what does it do?

    Thanks.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    fread's Avatar
    fread is offline Programming God
    Join Date
    Nov 2008
    Location
    Caribbean
    Posts
    654
    Blog Entries
    1
    Rep Power
    16

    Re: Main Function

    If you are referring to a language like C. The main function is a special function that is run first when a program executes. One usually tries to manage the other functions and the rest of the program from the main function. Wiki has some readings: http://en.wikipedia.org/wiki/Main_function_(programming)
    Perfection of means and confusion of ends seem to characterize our age. Albert Einstein

  4. #3
    Join Date
    Jul 2006
    Posts
    16,486
    Blog Entries
    75
    Rep Power
    143

    Re: Main Function

    C++ is not restricted to pure OOP. You would do better to think of it as procedural programming that supports OOP, rather than just as OOP. int main() is simply a function.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 06-02-2011, 12:09 AM
  2. void main(), int main()
    By jackson6612 in forum C and C++
    Replies: 11
    Last Post: 04-10-2011, 09:17 PM
  3. Replies: 3
    Last Post: 11-12-2010, 05:47 PM
  4. Replies: 6
    Last Post: 11-02-2010, 05:09 AM
  5. int main() or void main().!
    By UbuntuX in forum C and C++
    Replies: 16
    Last Post: 08-08-2010, 12:21 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts