This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: need help


> 
> 2. I get an annoying warning message - "warning: too many 
> arguments for format". What does it mean?

Probably that you're doing something like 

printf("%s %d\n", name, age, address);

i.e. there are more arguments than there are %'s.
 
> 3. Good programing parctice - If I have a static global 
> variable, that is defined in one file, but not used in it - 
> why is it a bad thing (I get a warning)?

Static variables (and functions) are not visible to other files. So if
they're not referenced in the file in which they are defined, then they
may as well not exist.

Cheers,
Jon



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]