I'm making a program, and I have a class called "Cell". Two members of this class are:
char dChar;
char hChar;
In the constructor, I have dChar set to "?", and I try to have hChar set to "X". However, when I go to output both of these values, only the dChar shows up. I did strcpy to both of them, with no variations. I'm fairly new to C++, so I'm wondering if, for some reason, you can only have one char variable in a class. I don't see why that would be, but it's the only explanation I can think of. Can anyone help? Thanks.
char dChar;
char hChar;
In the constructor, I have dChar set to "?", and I try to have hChar set to "X". However, when I go to output both of these values, only the dChar shows up. I did strcpy to both of them, with no variations. I'm fairly new to C++, so I'm wondering if, for some reason, you can only have one char variable in a class. I don't see why that would be, but it's the only explanation I can think of. Can anyone help? Thanks.