C++ Beginner - Trouble using structs and constants!
- by Francisco P.
Hello everyone!
I am currently working on a simple Scrabble implementation for a college project.
I can't get a part of it to work, though!
Check this out:
My board.h:
http://pastebin.com/J9t8VvvB
The subroutine where the error lies:
//Following snippet contained in board.cpp
//I believe the function is self-explanatory...
//Pos is a struct containing a char, y, a int, x and an orientation, o, which is not //used in this particular case
void Board::showBoard()
{
Pos temp;
temp.o = 0;
for (temp.y = 'A'; temp.y < (65 + TOTAL_COLUMNS); ++temp.y)
{
for (temp.x = 1; temp-x < (1 + TOTAL_ROWS); ++temp.x)
{
cout << _matrix[temp].getContents();
}
cout << endl;
}
}
The errors returned on compile time:
http://pastebin.com/bZv7fggq
How come the error states that I am trying to compare two Pos when I am comparing chars and ints?
I also really can't place these other errors...
Thanks for your time!