'What does the error "Editor placeholder in source file" mean in C++?
I am writing code to solve a knights tour problem and in my function that checks if a move is safe or not I am getting a failed build and the error is right at the top of the function:
bool KnightsTour::isValid(int x, int y, int moveNum) // error is popping up right here
{
// grabs dimensions of board - may have mixed them up
std::vector<std::vector<int>>::size_type xSize = board.size();
std::vector<std::vector<int>>::size_type ySize = board[0].size();
// check bounds
if(( (0 <= x && x < xSize) && (0 <= y && y < ySize) ) && (moveNum <= totalMoves))
{
// in bounds and is in count limit
// check if the sqaure has been visited
if(board[x][y] > 0)
{
// has been visited
return false;
}
else
{
// either the beginning or has not been visited
return true;
}
}
// move not valid
return false;
}
I feel like my logic is right, and even if it wasn't the build wouldn't fail. In my class definition I defined the function as this:
class KnightsTour
{
private:
int totalMoves;
std::vector<std::vector<int>> board;
public:
KnightsTour(int, int);
bool isValid(int, int, int);
// erased other methods for clarity
};
I have never seen this error before, and I don't see the issue personally. Any help is appreciated thank you.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
