Re: Must use 'struct' tag to refer to type

Discussion in 'C++' started by Victor Bazarov, Dec 17, 2012.

  1. 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
    Victor Bazarov, Dec 17, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tom wilson
    Replies:
    7
    Views:
    4,079
    William F. Robertson, Jr.
    Feb 10, 2005
  2. =?Utf-8?B?QWxpeHggU2tldmluZ3Rvbg==?=

    of type 'TextBox' must be placed inside a form tag with runat=serv

    =?Utf-8?B?QWxpeHggU2tldmluZ3Rvbg==?=, Apr 22, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    11,469
    =?Utf-8?B?QWxpeHggU2tldmluZ3Rvbg==?=
    Apr 22, 2005
  3. shruds
    Replies:
    1
    Views:
    707
    John C. Bollinger
    Jan 27, 2006
  4. Chris Fogelklou
    Replies:
    36
    Views:
    1,335
    Chris Fogelklou
    Apr 20, 2004
  5. André
    Replies:
    2
    Views:
    679
    André
    Jun 23, 2008
Loading...

Share This Page