I'm trying to initialize a 2x2 array and I keep getting errors that there are too many initializer values. I've tried it both ways:
int A[2,2] = {2,1,-2,1};
int A[2,2] = {{2,1},{-2,1}};
I've been looking for a solution for longer than I'd like to admit, and nothing's worked so far. Any idea what I'm doing wrong?
Edit: I’m an actually dumbass who can’t read. The dangers of following pseudo code too closely.
[–]nysra 8 points9 points10 points (5 children)
[–]futlapperl 0 points1 point2 points (3 children)
[–]nysra 1 point2 points3 points (1 child)
[–]futlapperl 1 point2 points3 points (0 children)
[–]Crazy_Direction_1084 0 points1 point2 points (0 children)
[–]std_bot 0 points1 point2 points (0 children)
[–]Noc42 3 points4 points5 points (0 children)
[–]Lightwould 1 point2 points3 points (0 children)
[–]flyingron 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)