FILE *foo = stderr; ==>`initializer element is not constant'

Richie Baldwin baldwinr@monolithss.com
Fri Jan 28 15:11:00 GMT 2005


When trying to compile a c file using stderr, I have the declaration:
FILE *foo = stderr;
and it keeps giving me "Initializer element is not constant". I was 
wondering what could be done to preven this error from happening.   I'm 
not sure if this is incorrect code or what, but any help would be 
appreciated.

The file is a short one, it is:
#include <stdio.h>
FILE *foo = stderr;

and it gives me the error on line 2.

Any assistance that you all could provide would be greatly appreciated.
Richard Baldwin.



More information about the Gcc-help mailing list