Simple 2d array question

I can't figure out why this isn't working, any help is really appreciated!

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

#include <iostream>
using namespace std;



int main ()
{
    
    char grid[5][5]=
    {
        {"o","o","o","o","o"},
        {"o","o","o","o","o"},
        {"o","o","o","o","o"},
        {"o","o","o","o","o"},
        {"o","o","o","o","o"},
    };
  
    
    
  
    
    
    
  cin.get();
  return 0;
}


Just keeps saying invalid conversion from const char to char
"o" gives you a c-string (const char*). Use single quotes for char 'o'.
Last edited on
Thanks a lot mate, it's usually always something simple!
Topic archived. No new replies allowed.