I have been downloading C samples of terrain heightmap generation code and now have a good batch to pick from however one of them uses classes which I am not too comfortable with
The code I added is below followed by the error. It seems to imply that terrain is not a member of class HillTerrain even though it's setup in the line above
error C2228: left of '.Generate' must have class/struct/union type
Can anyone take a guess at what's wrong here ( assuming I have given enough information )
The code I added is below followed by the error. It seems to imply that terrain is not a member of class HillTerrain even though it's setup in the line above
- Code:
#include "rfHillTerrain.h"
using namespace RobotFrog; // the class is in this namespace
HillTerrain terrain(); //
terrain.Generate();
error C2228: left of '.Generate' must have class/struct/union type
Can anyone take a guess at what's wrong here ( assuming I have given enough information )