IPB

Welcome Guest ( Log In | Register )

> Error When Initializing An Array Of Structures
gbgb
post Dec 11 2007, 04:20 PM
Post #1


Regular
*

Group: EstablishedMember
Posts: 36
Joined: 14-February 07
Member No.: 2,908



I have a structure:

typedef struct
{
unsigned int A;
unsigned int B;
unsigned int c;
} ConvertCoeff;

and I declare an array of this structure:

ConvertCoeff coeff[8];

As long as I leave it this way everything is OK.
But if I try to intialize the array during decleration as follows:

ConvertCoeff coeff[3] = { {1,2,3}, {1,2,3}, {1,2,3}};

I get an error during compilation - missing semicolon.

Is it not a legitimate initialization? I know it is possible on other compilers - how do I do it in BoostC?
update Picpack 3.0 Released
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 3rd September 2010 - 02:48 PM