[FUG-BR] RES: C/C++
gethostbyname
gethostbyname em gmail.com
Domingo Fevereiro 25 00:10:44 BRT 2007
Essa exigência não é apenas da linguagem C++:
"*ISO/IEC 9899:1999 (E) ©ISO/IEC*
*5.1.2.2.1 Program startup*
The function called at program startup is named main. The implementation
declares no prototype for this function. It shall be defined **with a
return type of int** and with no parameters:
*int *main(void) { /*...*/ }
or with two parameters (referred to here as argc and argv, though any
names may be used, as they are local to the function in which they are
declared):
*int *main(int argc, char *argv[]) { /*...*/ }
or equivalent [ver a Nota]; or in some other implementation-defined manner.
*Nota*:
Thus, int can be replaced by a typedef name defined as int,or the type
of argv can be written as char ** argv, and so on."
gethostbyname
Nilton Jose Rizzo escreveu:
> Essa exigencia é da linguagem c++ faça esse exemplo e veja
> que o erro persiste
>
>
> #include <stdio.h>
>
> void main (void);
>
> void main (void)
> {
> printf ("teste");
> }
>
>
Mais detalhes sobre a lista de discussão freebsd