Jump to content

Main Function

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
hetra

hetra

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 297 posts
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

int main ()

Also, what does it do?

Thanks.

#2
fread

fread

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 787 posts
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....on_(programming)
Perfection of means and confusion of ends seem to characterize our age. Albert Einstein :confused:

#3
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
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