Quote:
|
Originally Posted by bl00dninja
no, the funtion main is not a variable, the "keyword" "int" before the function is simply declaring the "return type" of the function. i get the impression that some of these replys are trying to over-complicate things. all the "int" does is say that "main" will "return" an integer. you can just as easily state "void" for the return type and disregard the "return = 0" statement. the other is done for form based on the "C" language (for purposes of error-checking...that "0" could also be a non-zero value which would indicate that something had gone wrong). sometimes you want functions to return a value to someone else and that is why functions have a return type. the C-style languages can get confusing this way. that is why JAVA and C# exist. fuck all that man, a lot of the questions you seem to ask could be answered better by a book. i don't know how the language barrier hurts that for you. i hope you do well.
|
That was the first post (on this forums) to contain the word "fuck" congrats. Bloodninja