|
-
October 5th, 2009, 10:48 AM
#1
Problems with strcmp
Hey,
basically I'm starting with C++, I've already learned quite a lot and I now wanted to start with a simple game of Tic Tac Toe.
So now that's the problem:
I'm basically trying to check if there's an "X" or a number saved in a char of an array. But that doesn't seem to work:
Code:
if (!strcmp(field[1],"X") == 0)
So I'm just wondering what I'm doing wrong, I guess I just need a different function, but I simply can't find something that would work.
Thanks in advance.
Tags for this Thread
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
|