C/C++ Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingC/C++ Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 18th, 2006, 04:09 PM
Vance_Kimiyoshi Vance_Kimiyoshi is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 2 Vance_Kimiyoshi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m 47 sec
Reputation Power: 0
Problem with Struct...

I'm using the program "Anim8or" to make 3-D models. I exported it as C, and there is a problem I can't figure out.

Problem:
Quote:
Line: 112765 Error: excess elements in aggregate initializer


Model.c - full struct.
Code:
struct Anim8orObject object_object01 = {
    "object01", 1, // Num Meshes
    &mesh01,
};


Model.c - line 112765.
Code:
};


Anim8orExport.h - function.
Code:
typedef struct Anim8orObject {
    const char *name;
    int nMeshes;
    Anim8orMesh *meshes[];
} Anim8orObject;



Can anyone help?

Reply With Quote
  #2  
Old March 18th, 2006, 04:20 PM
ubergeek ubergeek is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2005
Posts: 600 ubergeek User rank is Private First Class (20 - 50 Reputation Level)ubergeek User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 22 h 40 m 27 sec
Reputation Power: 4
Send a message via AIM to ubergeek
Try removing the comma after &mesh01 in Model.c

Reply With Quote
  #3  
Old March 18th, 2006, 04:29 PM
Vance_Kimiyoshi Vance_Kimiyoshi is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 2 Vance_Kimiyoshi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m 47 sec
Reputation Power: 0
Same error. :-\

Reply With Quote
  #4  
Old March 18th, 2006, 05:02 PM
ubergeek ubergeek is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2005
Posts: 600 ubergeek User rank is Private First Class (20 - 50 Reputation Level)ubergeek User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 22 h 40 m 27 sec
Reputation Power: 4
Send a message via AIM to ubergeek
I tried this in Dev-C++ 4.9.9.2 (backend gcc 3.4.2) and got "non-static initialization of a flexible array member" errors referring to &mesh01...can I see where mesh01 is defined?

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingC/C++ Help > Problem with Struct...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT