g++ compile error

G

Greg

I am tring to complie with g++ and get this error but don't understand what
cause it could someone tell what cause this type of error

In file included from main.cpp:3:
StringTokenizer.h:50: error: multiple types in one declaration
 
A

Alf P. Steinbach

* Greg:
I am tring to complie with g++ and get this error but don't understand what
cause it could someone tell what cause this type of error

In file included from main.cpp:3:
StringTokenizer.h:50: error: multiple types in one declaration

It means you have multiple types in one declaration.

To see how you have managed that, look at [StringTokenizer.h] line 50.

If you wanted someone in this newstgroup to look at it, why did you not
include that in your article?
 
G

Guest

Greg said:
I am tring to complie with g++ and get this error but don't understand what
cause it could someone tell what cause this type of error

In file included from main.cpp:3:
StringTokenizer.h:50: error: multiple types in one declaration

A missing semicolon at the end of a forward declaration can cause that
error:

class A
class B {};

Ali

P.S. I found the answer by Google'ing for it. You could too :)
 
T

Thomas Ibbotson

A missing semicolon at the end of a forward declaration can cause that
error:

class A
class B {};

Ali

P.S. I found the answer by Google'ing for it. You could too :)

I had exactly the same problem yesterday, and it baffled me for quite a
while, seen as I had pretty much copied the code from a tutorial I was
working through, I couldn't understand what was wrong, until I looked at
the example code very carefully, and then looked at my code very
carefully, and saw that I was missing a semi-colon. After 20 mins of
utter confusion I reckon I'm much less likely to miss it off again.

Tom
 

Ask a Question

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.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top