|
-
March 19th, 2010, 05:43 PM
#1
String_int
Hello,
I have the following situation:
I want to check if the char in a string is the same as an int.
So lets say:
int one = 1;
string test = "1234";
for(n = 0; n<4; n++)
{
if (string[n] == one) // this always comes back negative
{
action
}
}
Do I need to convert it to an int, and if so how do I do that?
Thanks,
Niels
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|