G
Geky
Can you tell me how I can access to an array of structure declared in
a file .cpp from any class?
a file .cpp from any class?
Geky said:Can you tell me how I can access to an array of structure declared in
a file .cpp from any class?
By name, usually.
V
By name, usually.
V
Victor said:By name, usually.
V
Geky said:I can't and I don't know why
example:
I declare an array of structure in a file. cpp.
I want to access to the structure from another file and then, in that
file, I declare the array of structure as "external".
when I try to use the structure my compiler returns me some errors
like:
error C2036: 'struct a_struct *': unknown size
error C2027: use of undefined type 'a_struct'
see declaration of 'a_struct'
error C2228: left of '. apple' must have class / struct / union type
Error executing cl.exe.
any idea?
It is *always* a good idea to check out the FAQ before posting.
<shrug> Stay ignorant
when I try to use the structure my compiler returns me some errors
like:
error C2036: 'struct a_struct *': unknown size
error C2027: use of undefined type 'a_struct'
see declaration of 'a_struct'
error C2228: left of '. apple' must have class / struct / union type
Error executing cl.exe.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.