473,386 Members | 1,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Too many types in declaration on Class declaration.

Fr33dan
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?

3 5604
Oralloy
988 Expert 512MB
Fr33dan,

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

Did you check that?
Oct 28 '10 #2
Fr33dan
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
988 Expert 512MB
You're quite welcome. Please flag the post, so others can see what the resoution was.
Oct 28 '10 #4

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

Similar topics

3
by: Corno | last post by:
Hi all, I was just wondering why a class declaration also includes the private members of a class. Is this information needed by other classes for compiling and/or linking or is this just an...
2
by: Jacek Dziedzic | last post by:
Is it valid to use a "using namespace foo" (as opposed to using foo::bar which I'm sure is legal) within a class declaration? My compiler rejects it, but I've been told it's valid. Can anyone...
4
by: Ovidesvideo | last post by:
Just a quick question. If I declare functions in the class declaration as such: class myclass { public: void function(int &x) { x++; } };
2
by: blueblueblue2005 | last post by:
Hi, there was a post several days ago about using forward class declaration to solve the circular including issue, today, one question suddenly came into mind: which class should the forward class...
7
by: Chris Lane | last post by:
Hi, I have the following class declaration and the ide is giving the following errors. Interface 'System.Web.UI.IPostBackDataHandler' is already implemented by base class...
1
by: Miguel Isidoro | last post by:
I generated a .cs class from a .xsd schema using the xsd.exe tool from Visual Studio 2005 and noticed that is generating duplicate class declarations. This happens because of my schema structure. I...
3
by: yancheng.cheok | last post by:
hello all, how can i make, a forward declaration class's enum member, being visible by another class? consider the following case, ---------------------------- dog.h...
5
by: Owen Ransen | last post by:
When I installed the new VC 2005 I though, aha at last I will be able initialise static const members in the H file, and I can, but only integer types. double types have to be declared in the H...
5
by: swcamry | last post by:
class bitset::reference { friend class bitset; reference(); // no public constructor public: ~reference(); operator bool () const; //...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.