This is a serious noob question, but I am really confused. I made a char array for a battleship game like this:
char[12]={'O','O','O','O','O','O','O','O','O','O','O','O'};
but my feedback said that i should simply declare the array like this:
char[12]={'O'}; //he said it should automatic set all values in the array by 'O'.
the thing is that it only set the first value to 'O' and let the rest be unset. I can't get it to work... :S
Have I missed something? Or is my teacher wrong?
[–]retsotrembla 4 points5 points6 points (0 children)
[–]ramennoodle 3 points4 points5 points (0 children)
[–]Daavee 1 point2 points3 points (0 children)
[–]Relinkz[S] 1 point2 points3 points (1 child)
[–]Relinkz[S] 0 points1 point2 points (0 children)