public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Array of Structures Initialization
@ 2004-11-15 14:22 Kevin Stedman
  2004-11-15 14:41 ` Eljay Love-Jensen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kevin Stedman @ 2004-11-15 14:22 UTC (permalink / raw)
  To: gcc-help

Hello All,

Can someone give me an idea on how to figure out what
is going on with my initialization of an array of
structures.  This code compiles on Sun using the Sun
One studio CC compiler.  I am porting it to lnux and
have never seen this problem before.  Code examples of
what I am trying to compile are below.  Everything is
in the C header file.  When I compile I do not have
any gcc flags except for -g -c -o.  I get error
messages: "initializer element is not constant" and
"incompatible types in initialization" on every line
of the initialization of the array of structures
below.

#define INTEGER4 4
#define REAL8 8
#define STRING 9

typedef union{
	double RealX8;
	long IntX4;
	char *Str;
} InputValue;

typedef struct _Arguments{
	int keyword;			
	char *prompt_string;		
	char *default_string;		
	int type;			
        InputValue default_value;	
} Arguments;

Arguments SortLightningArgs[]={
	{Title, "NLDN Sort Routine (US
only)",NULL,INTEGER4,NULL},
	{UserDefined,"Minimum propagation
delay",".001",REAL8,NULL},
	{UserDefined,"Maximum propagation
delay","1.0",REAL8,NULL},
	{UserDefined,"Minimum latitude","20.0", REAL8,NULL},
	{UserDefined,"Maximum latitude","50.0", REAL8,NULL},
	{UserDefined,"Minimum longitude","-50.0",
REAL8,NULL},
	{UserDefined,"Maximum longitude","-150.0",
REAL8,NULL},
	{UserDefined,"Input file containing NLDN event
times","lightning.times.251_253", STRING,NULL},
	{UserDefined,"Output file containing list of time
differences and intensities",
                   "HistoTimeDifs.txt", STRING,NULL},
	{NULL,NULL,NULL,NULL,NULL}
};


Thank You for any help,

Kevin


		
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-11-15 15:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-15 14:22 Array of Structures Initialization Kevin Stedman
2004-11-15 14:41 ` Eljay Love-Jensen
2004-11-15 14:42 ` Ramana Radhakrishnan
2004-11-15 15:06 ` serge fukanchik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).