Help me with 2d Char array please?

What I want to do is know if I am couting this right. I want a random char (i just have 1 because it is easy to see) and have it move around. Would I set up a random number generator and say IF the rng is 1, it would cout m+1 (moves row) and 2 is n+1 (col)? this is what I have
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
30
31
32
#include <iostream>
using namespace std;

int main ()
{

    char map [11][11];
    int m,n; //loop


  for (m=0; m<11; m++ )
  {

    for (n=0; n<11; n++)
    {
        map[5][5]=(char)1;
        cout<<map[m][n];

        if(m==0)
        cout<<"-";
        else if (m==10)
        cout<<"_";
        else
        cout<<".";      
    }
    cout<<endl;

  }


  return 0;
}

Sorry I am new to coding. Do not know how to use string, prof has not taught us that. Also is there a way i could system("cls") and loop it so you would't see the smiley there when you keep hitting it to move?
Topic archived. No new replies allowed.