I'm making a game, and for the HUD, I need to display the code page 437 characters (I can already do) AND display the variables of the health/xp/whatever, inside the HUD. I sort of have an idea, but it is a little complex, and I want to know if there is a somewhat easier way.
stringstream s; // #include <sstream>
s << "Health: " << health << " Exp: " << exp << " whatever: " << whatever;
string output = s.str();
for(int i = 0; i < output.length(); ++i)
{
// output[i] is a character in the string
}
If that's not what you meant, can you clarify more?