By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,985 Members | 1,712 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,985 IT Pros & Developers. It's quick & easy.

Too many types in declaration on Class declaration.

Fr33dan
P: 57
I'm a long time Java guy trying to move to C++ but I keep getting this error that I can't seem to figure out. It must be something simple I'm missing but I can't find it by looking at examples.

I get a "Too many types in declaration" on my class declaration line:
Expand|Select|Wrap|Line Numbers
  1. #include<string>
  2. #include<vector>
  3. #include"MapCoordinates.h"
  4.  
  5. class TopographicalMap //Error: Too many types in declaration
  6. {
  7.     private:
  8.     double getVarience(MapCoordinates*);
  9.     std::vector<int> splitString(std::string*);
  10.     std::vector< std::vector<int> > mapData;
  11.     int mapWidth;
  12.     int mapHeight;
  13.  
  14.     public:
  15.     TopographicalMap(std::string);
  16.     MapCoordinates getBestLocation(int, int);
  17.  
  18. };
I found this but his problem seemed to be the semicolon which I've added.

I'm using Borland 5.5
Oct 28 '10 #1

✓ answered by Oralloy

Fr33dan,

It looks like you might have a missing semicolon in the file "MapCoordinates.h".

Did you check that?

Share this Question
Share on Google+
3 Replies


Oralloy
Expert 100+
P: 983
Fr33dan,

It looks like you might have a missing semicolon in the file "MapCoordinates.h".

Did you check that?
Oct 28 '10 #2

Fr33dan
P: 57
I didn't even consider that since there were no flags on that file but that was the answer. I knew it was something simple. Thank you.
Oct 28 '10 #3

Oralloy
Expert 100+
P: 983
You're quite welcome. Please flag the post, so others can see what the resoution was.
Oct 28 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.