What I am trying to do below in make an array of GridSpot objects in my Solve class. I don't really know what the issue is here because I feel like I should be able to make an array of objects. The array is even empty now, so I dont know what to make of it.
GridSpot Class:
Code:
class GridSpot{
public:
GridSpot(int zero, int one, int two, int three, string name);
int getSpot(int spot) const {return gridNumbers[spot]; }
int setOrientation(int newOrien) {orientation = newOrien;}
void rotateGrid(int rot);
string getName() {return cardName;}
private:
int gridNumbers[4];
int orientation;
string cardName;
};
Solve Class:
Code:
class Solve{
public:
Solve(GridSpot toBeSolve[]);
void printSolve(GridSpot printMe[]);
void solveThisStuff(GridSpot finalArray[]);
void switchCards(int spotToBeSwitched);
private:
GridSpot gridToBeSolved[9];
};
errors:
Code:
- X:\csci241\mp3.cpp In constructor `Solve::Solve(GridSpot*)':
-92 X:\blenkhor\csci241\mp3.cpp no matching function for call to `GridSpot::GridSpot()'
- note X:\blenkhor\csci241\mp3.cpp:11 candidates are: GridSpot::GridSpot(const GridSpot&)
- note X:\blenkhor\csci241\mp3.cpp:11 GridSpot::GridSpot(int, int, int, int, std::string)
these errors point to my constructor of my Solve class, I don't have the constructor doing anything yet, I just need to get this bog worked out
Constructor for Solve:
Code:
Solve::Solve(GridSpot toBeSolved[]){
}
Anyone have any ideas because this is frustrating me to no end?