Quote Originariamente inviata da darth89 Visualizza il messaggio
Grazie, effettivamente proprio questo mi creava qualche perplessità dato che time.h è presente in tutti i file...
Ad ogni modo, ho provato con il tuo codice e mi da i seguenti errori:
- "main deve ritornare un int", ma main è una void;
- e mi dice che __fpurge, come per gli altri file, non sono dichiarati in questo campo("was not declared in this scope").
__fpurge? Usa fflush. NB: fflush(stdin) è comporta un undefined behavior.
An implementation shall not predefine the main function. This function shall not be overloaded. It shall have a return type of type int, but otherwise its type is implementation-defined. All implementations shall allow both the following definitions of main: int main()and int main(int argc, char* argv[])