[A83] Re: C(++) programming


[Prev][Next][Index][Thread]

[A83] Re: C(++) programming




Hi!

> main is a function just like anything else you call.

wrong, the main function is a special function. this is the point where the
processor starts to work when executing a program.

> int main();
> - that returns an integer

right.

>
> i would think that "main()" returns an error because the prototype of the
> function is not defined.
>

wrong, in ANSI C the standard type for functions is int.

> return 0;
>  - returns 0 for completed successfully
>  - if you have error handlers you might want to return something else

ok. return "codes" are a desicion of the programmer.

>  - this is typically flip flopped for unix systems

i don't think so.

> -harper

-andi

PS: correct me if i'm wrong anywhere





References: