A getPlot(int x, int y) Function?

Do it next to one of the already declared methods in CvCity.h.
Since you call it from inside another CvCity method, the level of protection (public/protected/private) does not matter, so you can place it pretty much anywhere inside the class.

It is inside the class...
 
It is inside the class...

Can you attach your CvCity.h and CvCity.cpp files? because according to the compiler errors it is not inside the class.
 
You really could have just attached a zip of the 2 files instead of the 70MB zip...
(And in any case - there's no need to attach the boost and python folders - since they're always the same, or the Debug of 'Final Release' folders - since they are created by the project).

I compiled your files. I didn't get the 'isBorderTerrain' : is not a member of 'CvCity' error, since it is already declared in CvCity.h (as you said).
In CvCity, the only error I got was:
Code:
1>CvCity.cpp(1808) : error C2662: 'CvCity::isBorderTerrain' : cannot convert 'this' pointer from 'const CvCity' to 'CvCity &'

Which you can fix by changing isBorderTerrain() to a const method:
In CvCity.cpp
Code:
bool CvCity::isBorderTerrain(TerrainTypes terrain) [B]const
[/B]{
...

In CvCity.h
Code:
bool isBorderTerrain(TerrainTypes terrain) [B]const[/B];

And you have a few other errors in CvInfos.cpp.
Let me know if you need help with these.

In addition, I've noticed that you're using Danny Daemonic's version of makefile without the fastdep utility which creates the dependencies between files.
That means that whenever you make a change to a header (.h) file, you must do a rebuild (and not just a build), otherwise you'll have conflicts between files.
 
By rebuilding, debugging, and rebuilding, I got it to work. Thanks!
 
Back
Top Bottom