Okay, so I'm completly new to programming, and I've been using Sams Teach Yourself C++ in one hour a day over the last two days, admittingly taking in more than a days worth per day, though.
This morning I decided I was bored of reading theory, and decided to get my hands dirty actually writing a small program, which I figure I can expand on and fix to implement new features as I advance. Long story short, I was inspired by the books idea that one could use a multi-dimentional array to, for instance, store a chess-board. So, I decided to create a game of tic-tac-toe versus the computer.
Now, the problem I am having, is in the function I'm writing to handle the computer's moves. I can't seem to get my if statements to compare the array for a specific value, and I would be very thankful if anyone could explain how I might go about doing this a different way.
What I'm trying to do is this:
<code>
if (board[3][3] == {0,0,0,0,0,0,0,0,0})
</code>
This won't compile, however. It seems if-statements might be unable to compare an array to its own value in this way. The only other way I can of doing this would be to use:
<code>
if (board[0][0] == 0 && board[0][1] == 0 && </code etc...
This would be both time and space-consuming given the amount of options, and I assume there must be some sort of way of doing it like I tried to initially.