View Single Post
Old 12-06-2004, 06:07 AM   #5 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
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 )
{
//--
}
__________________
Valmont is offline   Reply With Quote