Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HELP?? error C2146: syntax error : missing ';' before identifier 'QUEUE'

2 views
Skip to first unread message

michael thomas

unread,
Feb 6, 2002, 2:20:51 PM2/6/02
to
I am using VC++ Visual Studio (v6) to write console apps on Windows 2000,
using no MFC.

I am having a real bad time with the following errors within buffer.h and
queue.h of the VC++ compiler i.e .../VC98/include.

ERRORS :-

c:\program files\microsoft visual studio\vc98\include\buffer.h(33) : warning
C4200: nonstandard extension used : zero-sized array in struct/union
c:\program files\microsoft visual studio\vc98\include\buffer.h(98) : warning
C4200: nonstandard extension used : zero-sized array in struct/union
c:\program files\microsoft visual studio\vc98\include\queue.h(23) : error
C2146: syntax error : missing ';' before identifier 'QUEUE'
c:\program files\microsoft visual studio\vc98\include\queue.h(23) : fatal
error C1004: unexpected end of file found

Whe I take a look at the code within what are Microsoft's header files, I
don't see anything wrong. How can Microsoft's own code be screwed up,
I know some of you will be laughing at that statement. But really, this must
be some kind of a bug. I have applied SP5 to the Visual Studio, to
no affect.

Thanks

Michael

michael...@onebox.com


Craig Powers

unread,
Feb 6, 2002, 2:49:05 PM2/6/02
to
michael thomas wrote:
>
> c:\program files\microsoft visual studio\vc98\include\buffer.h(33) : warning
> C4200: nonstandard extension used : zero-sized array in struct/union
> c:\program files\microsoft visual studio\vc98\include\buffer.h(98) : warning
> C4200: nonstandard extension used : zero-sized array in struct/union

Standard headers in the STL (which it appears these might be, I'm not
sure offhand) are not silent at warning level 4.

> c:\program files\microsoft visual studio\vc98\include\queue.h(23) : error
> C2146: syntax error : missing ';' before identifier 'QUEUE'

Check your own code - this error might indicate omission of the ';' at
the end of a class declaration, especially if one of your own header
files is included prior to <queue> (or whatever the standard include
is).

e.g.

// myclass.h
class myclass
{
// etc.
} // Oops, forgot ';' here

// myclass.cpp
#include "myclass.h" // Oops, declaration of myclass forgot ';'

#include <queue>

Jack Jia

unread,
Feb 6, 2002, 5:14:02 PM2/6/02
to
Try to change /Tools/Options/Directories, put the Platform SDK includes as
the first include directory.

--
Jack Jia

"michael thomas" <michael_st...@sita.int> wrote in message
news:a3rvmg$hpr$1...@nntp.sita.int...

0 new messages