What's wrong in this wrong

What's wrong in this wrong?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  #include<iostream>
using std::cout;
using std::endl;

#include<iomanip>
using std::setw;

int main()
{
    int deck[4][13];
    //Initializing deck array
    for(int row = 0; row < 4; row++)
    {
        for(int column = 0; column < 13; column++)
        {
            deck[row][column] = 0;
        }
    }
    //display deck array contents
    for(int row = 0; row < 4; row++)
    {
        for(int column = 0; column < 13; column++)
        {
            cout<<setw(4)<<deck[row][column]<<(column = 12 ? '\n' : '\t');
        }
    }
    return 0;
}
What's wrong in this wrong?


Generally it is more helpful to describe the difference between what you expect code to do and what it actually does in terms of behavior or output than it is to say: "Something is wrong with this. What is it?"

One thing jumps out at me: = is assignment. == is comparison. See line 24.
Thanks. Proplem solved
Topic archived. No new replies allowed.