Non hai precisato il linguaggio. Nel caso sia C ottengo:
codice:
$ gcc -Wall -ansi -pedantic -Wextra -Wconversion main.c 
main.c:22: error: parse error before '/' token
main.c:30: error: parse error before '/' token
main.c:33: error: missing terminating ' character
main.c:36: error: parse error before string constant
main.c:36: warning: type defaults to 'int' in declaration of 'printf'
main.c:36: error: conflicting types for 'printf'
main.c:36: note: a parameter list with an ellipsis can't match an empty parameter name list declaration
main.c:36: warning: data definition has no type or storage class
main.c:37: error: parse error before string constant
main.c:37: warning: type defaults to 'int' in declaration of 'printf'
main.c:37: error: conflicting types for 'printf'
main.c:37: note: a parameter list with an ellipsis can't match an empty parameter name list declaration
main.c:37: warning: data definition has no type or storage class
main.c:38: error: parse error before string constant
main.c:38: warning: type defaults to 'int' in declaration of 'printf'
main.c:38: error: conflicting types for 'printf'
main.c:38: note: a parameter list with an ellipsis can't match an empty parameter name list declaration
main.c:38: warning: data definition has no type or storage class
main.c:46: error: parse error before 'do'
main.c:47: error: stray '\195' in program
main.c:47: error: stray '\185' in program
main.c:49: error: parse error before string constant
main.c:49: warning: type defaults to 'int' in declaration of 'printf'
main.c:49: error: conflicting types for 'printf'
main.c:49: note: a parameter list with an ellipsis can't match an empty parameter name list declaration
main.c:49: warning: data definition has no type or storage class
main.c:50: error: parse error before string constant
main.c:50: warning: type defaults to 'int' in declaration of 'printf'
main.c:50: error: conflicting types for 'printf'
main.c:50: note: a parameter list with an ellipsis can't match an empty parameter name list declaration
main.c:50: warning: data definition has no type or storage class
main.c:51: error: parse error before string constant
main.c:51: warning: type defaults to 'int' in declaration of 'printf'
main.c:51: error: conflicting types for 'printf'
main.c:51: note: a parameter list with an ellipsis can't match an empty parameter name list declaration
main.c:51: warning: data definition has no type or storage class
main.c:52: error: parse error before string constant
main.c:52: warning: type defaults to 'int' in declaration of 'printf'
main.c:52: error: conflicting types for 'printf'
main.c:52: note: a parameter list with an ellipsis can't match an empty parameter name list declaration
main.c:52: warning: data definition has no type or storage class
main.c:53: error: parse error before string constant
main.c:53: warning: type defaults to 'int' in declaration of 'printf'
main.c:53: error: conflicting types for 'printf'
main.c:53: note: a parameter list with an ellipsis can't match an empty parameter name list declaration
main.c:53: warning: data definition has no type or storage class
main.c:54: error: parse error before string constant
main.c:54: warning: type defaults to 'int' in declaration of 'printf'
main.c:54: error: conflicting types for 'printf'
main.c:54: note: a parameter list with an ellipsis can't match an empty parameter name list declaration
main.c:54: warning: data definition has no type or storage class
main.c:55: error: parse error before string constant
main.c:55: warning: type defaults to 'int' in declaration of 'printf'
main.c:55: error: conflicting types for 'printf'
main.c:55: note: a parameter list with an ellipsis can't match an empty parameter name list declaration
main.c:55: warning: data definition has no type or storage class
main.c:56: error: parse error before string constant
main.c:56: warning: type defaults to 'int' in declaration of 'scanf'
main.c:56: error: conflicting types for 'scanf'
main.c:56: note: a parameter list with an ellipsis can't match an empty parameter name list declaration
main.c:56: warning: data definition has no type or storage class
main.c:69: error: 'elenco_contribuenti' undeclared here (not in a function)
main.c:69: error: initializer element is not constant
main.c:70: error: parse error before 'break'
main.c:91: error: parse error before string constant
main.c:91: warning: type defaults to 'int' in declaration of 'system'
main.c:91: warning: data definition has no type or storage class
main.c: In function 'inserisci':
main.c:97: error: parse error before '/' token
main.c:114: warning: ISO C90 forbids mixed declarations and code
main.c:119: warning: ISO C90 does not support the '%lf' printf format
main.c: In function 'media_reddito':
main.c:126: error: parse error before '/' token
main.c:130: error: 'i' undeclared (first use in this function)
main.c:130: error: (Each undeclared identifier is reported only once
main.c:130: error: for each function it appears in.)
main.c: In function 'visualizza':
main.c:137: error: parse error before '/' token
main.c:137: error: missing terminating ' character
main.c:148: error: 'i' undeclared (first use in this function)
main.c:152: warning: control reaches end of non-void function
main.c: At top level:
main.c:137: warning: unused parameter 'n'
main.c: In function 'salva_elenco':
main.c:154: error: parse error before '/' token
main.c:162: warning: ISO C90 forbids mixed declarations and code
main.c:168: error: 'i' undeclared (first use in this function)
main.c:169: warning: ISO C90 does not support the '%lf' printf format
main.c:174: warning: control reaches end of non-void function
main.c: In function 'cerca_codice_fiscale':
main.c:176: error: parse error before '/' token
main.c:184: error: 'i' undeclared (first use in this function)
main.c:190: warning: control reaches end of non-void function
main.c: In function 'cerca_reddito':
main.c:192: error: parse error before '/' token
main.c:204: error: 'i' undeclared (first use in this function)
Nel caso invece sia C++ si ottiene:
codice:
$ g++ -Wall -ansi -pedantic -Wextra -Wconversion main.cpp
main.cpp: In function 'int main(int, char**)':
main.cpp:66: warning: format '%lf' expects type 'double*', but argument 7 has type 'double'
main.cpp:69: warning: unused variable 'media'
main.cpp: At global scope:
main.cpp:31: warning: unused parameter 'argc'
main.cpp:31: warning: unused parameter 'argv'
main.cpp: In function 'int inserisci(contribuenti*, int)':
main.cpp:111: warning: format '%lf' expects type 'double*', but argument 2 has type 'double'
main.cpp:119: warning: ISO C++ does not support the '%lf' printf format
main.cpp: In function 'int media_reddito(contribuenti*, int)':
main.cpp:134: warning: converting to 'int' from 'double'
main.cpp: In function 'int visualizza(contribuenti*, int)':
main.cpp:148: warning: ISO C++ does not support the '%lf' printf format
main.cpp: At global scope:
main.cpp:137: warning: unused parameter 'n'
main.cpp: In function 'int salva_elenco(contribuenti*, int)':
main.cpp:169: warning: ISO C++ does not support the '%lf' printf format
main.cpp: In function 'int cerca_codice_fiscale(contribuenti*, int)':
main.cpp:186: warning: ISO C++ does not support the '%lf' printf format
main.cpp: In function 'int cerca_reddito(contribuenti*, int)':
main.cpp:206: warning: ISO C++ does not support the '%lf' printf format
main.cpp: In function 'int salva_elenco(contribuenti*, int)':
main.cpp:174: warning: control reaches end of non-void function
main.cpp: In function 'int cerca_codice_fiscale(contribuenti*, int)':
main.cpp:190: warning: control reaches end of non-void function
il tutto con:
codice:
$ gcc --version 
i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5367)
Copyright (C) 2005 Free Software Foundation, Inc.