Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   Re: Must use 'struct' tag to refer to type (http://www.velocityreviews.com/forums/t955604-re-must-use-struct-tag-to-refer-to-type.html)

Victor Bazarov 12-17-2012 09:48 PM

Re: Must use 'struct' tag to refer to type
 
On 12/17/2012 4:37 PM, Bint wrote:
> I am getting this message when I try to include a '.h' file that I need:
>
> "Must use 'struct' tag to refer to type"
>
> It is coming from this in the header:
>
> struct fchar {
> unichar val;
> float width, t_top,t_bot,t_left,t_right;
> float v_top,v_bot,v_left,v_right;
> fchar *next; // <---
> };
>
> I've read online that this should only happen with C files, not C++.
>
> However my files are all C++ (or rather '.mm', objective-C/C++ files).
> I am also able to include the same header in another file with no trouble.
>
> Anyone know what the problem could be?


Are you sure you're using a C++ compiler to compile your file, and it's
a C++ compiler that gives you that message? 'Coz if it ain't, there
ain't much *we* can do about it either...

Given that 'unichar' is a known type, your definition of 'fchar' type is
OK AFA C++ rules go.

V
--
I do not respond to top-posted replies, please don't ask


All times are GMT. The time now is 02:09 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.