Quote:
|
Originally Posted by Kernel_Killer Well, if I have a string of characters, can I get the ASCII value of each character some way?
Let me explain what I'm wanting to do. I have a string array holding cards from a deck. 2-A and the ASCII characters 0x0003-6. since it's in a string, I'm having a bit of trouble comparing the values against each other. I thought if I could get them in Bin or Hex, it would make my comparisions easier. |
If you are using std::string then you can compare strings directly:
string a("hullo");
string b("hello");
if( a == b )
{
//--
}