JR> I use the following format to store and retrieve int's from a class.
I bet you don't. class, public and private don't start with a capital
letter. This might be a "feature" of your offline reader, though.
JR> like to know how to store and retrieve char's. I've been unable to
JR> in a class. Could someone please help me out?
If I understand you right, you want the member itsHitPoint to be of
type char instead of int? If I remember right, you asked this question
a week ago already, and there were several correct answers.
JR> Class PlayerInfo
JR> {
JR> Public:
JR> int GetHitPoint() const { return itsHitPoint;}
JR> void SetHitPoint(int hitPoint) { itsHitpoint = hitPoint; }
JR> Private:
JR> int itsHitPoint; // characters Hit Points
JR> };
Just replace all three occurrences of int with char.
Thomas
---
þ MM 1.0 #0113 þ How do you know it's summer in Seattle? The rain is warm!
---------------
* Origin: McMeier & Son BBS (2:301/138)
|