tags:

views:

1632

answers:

4

why do I get "multiple types in one declaration" error when compiling c++ program?

+2  A: 

you must have declared twice the same variable in some class or two class with same name, see this on SO.

Could be also missing ; or a class definition with broken syntax ...

if you can show us some code would be better

RageZ
A: 

My guess is you're missing a closing brace somewhere in a class definition, or a semicolon after it.

Grumdrig
+7  A: 

You probably have code that's the equivalent of

int float x;

probably

class Foo { } float x;

or in it's more common form

class Foo {
  //
}

float x;
MSalters
A: 

I had the same problem. Sometimes the error line does not show the correct place. Go through all new-created/modified classes and see if you forget ";" in the end of class defifnition.

Narek