|
-
February 3rd, 2009, 06:02 AM
#1
Returning a struct or pointer to struct froma a function
In the .h file of my class I defined a structure.
Now, in the .cpp of the same class, I need to return from a member function a pointer to the structure, say structure* type.
Anyway, compiler doesn't allow, saying missing storage-class identifier, as if the structure has not been defined. But I did, in the header file, so this can't be.
Any clues on why I get this problem? Isn't it possible to return a struct pointer, or a struct, from a function?
How solve this, besides defining the function as void*?
Thanks in advance and sorry for the bothering.
- Buzzyous -
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|