Re: compilation of ms crypto api program

From: Erwann ABALEA (erwann_at_abalea.com)
Date: 06/19/03


Date: Thu, 19 Jun 2003 18:33:37 +0200

On Thu, 19 Jun 2003, Sisyphus wrote:

> 'main()' should not return a value (because you have specified void) - so
> delete "return(0);" at the end.

main() *always* returns an int. void main() has never been a valid
prototype.

-- 
Erwann ABALEA <erwann@abalea.com> - RSA PGP Key ID: 0x2D0EABD5
-----
Due to a typo on my part, a group named free.quatramran has been
created. That was a mistake. My apologies to all concerned.
Unfortunately, the free.* charter does not permit rmgroup messages,
-+- DM in GNU : ENS de Paris, section vaisselle avec les pieds -+-


Relevant Pages

  • Re: confusion: casting function pointers
    ... pointer from the 'actual/other modules' that takes arguments of type ... list to types of void *). ... int main{ ... without a prototype, a number of special "promotion" rules take ...
    (comp.lang.c)
  • Re: Function arguments and their size
    ... >void f(int a, char b); ... As long as there is a prototype in scope, ... would pass a double to a function that needs an int, ...
    (comp.lang.c)
  • Re: C Questions
    ... No prototype is given for this function, so the compiler cannot ... To prototype a function with no parameters, use void: ... %d takes an int argument, ...
    (comp.lang.c)
  • Re: main function
    ... user--must not declare its prototype. ... int main; ... other than int is considered to be undefined behavior; some compilers ... than int, such as void, but you should avoid using such a definition, ...
    (comp.lang.c)
  • Re: Lvalue Required(wierd)...
    ... main must have a return type of int ... Warning MAIN.C 3: Call to function 'clrscr' with no prototype ... int main (void) ...
    (comp.lang.c)

Quantcast