Ok, I'm havin a little bit of a problem that I can't figure out. I'm using a multi-file C project in Visual Studio .NET. I need this to conform to the ANSI C standard.
I'm defining some structures here as:
struct myStruct
{
//blah
};
in some file, lets call it struct_def.h. Ok, now, I want to create an instance of this struct in main.c. What is the correct way to do this? I've tried 3 different ways that I can think of, and it either comes down to I'm "redefining" the struct, or it says I'm trying to create an instance of an unknown structure... could someone provide a basic example?
I'm defining some structures here as:
struct myStruct
{
//blah
};
in some file, lets call it struct_def.h. Ok, now, I want to create an instance of this struct in main.c. What is the correct way to do this? I've tried 3 different ways that I can think of, and it either comes down to I'm "redefining" the struct, or it says I'm trying to create an instance of an unknown structure... could someone provide a basic example?