structure within a structure in C
Hi,
I've been asked to transfer a bit of code from C++ to C. But am having a small bit of trouble with a .h file. Basically it calls a structure from a structure.
so I have
struct A_STRUCTURE
{
float a;
float b;
float c;
};
Then
struct B_STRUCTURE
{
A_STRUCTURE location; <- problem line
float d;
.........
When I build I get the follwing error
test.h:37: error: syntax error before A_STRUCTURE
I'm sure I could move A_STRUCTURE to another .h file, but other that doing that can I decalre a structure calling a structure in a header file in C? (If that makes sense :s )
Thanks
Last edited by knobby67; 03-06-2007 at 08:08 AM.
|