Hi, I'm rather new at C++ but I decided to go on and write 'a' program to see how far I could get. I got quite a while until I tried to do this:
But then when I compile It tells me that const char and char aren't compatible types...Code:class PlayerObject // The Object Representing the Player
{
public:
PlayerObject();
//Constructor
~PlayerObject();
//Destructor
char EndReason[50]; //Value to set 'Reason of Endgame' to
};
*SNIP*
int main()
{
PlayerObject Player1;
Player1.EndReason[50] = "The games not finished yet";
}
So...
what's the difference between a Const Char and a normal Char, and why does it prohibit my program from working the way I want it to?