000
20.03.2006, 13:12 Uhr
darkstar2005
|
Habe einen Struct der einen Array als Membervariable beinhaltet:
Code: |
typedef enum{ DIES,DAS }MessageType; typedef struct{MessageType type; unsigned long data[32]; }TriggerData;
|
will im main die data instantieren
Code: |
int main(int argc, char* argv[]){
TriggerData sValue; sValue.data = { 0x00000013,0x00000033,0x00000023,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000 }; sValue.type = DIS; }
|
bekomme den error: Syntaxfehler '{' in der Zeile sValue.data = { 0x....... |