That is not initializing the array, it's printing it. Given that it's not initialized, it prints garbage.
Instead of:
cout << map[row][col]; you want:
map[row][col] = '*'; That will set the initial value for each cell in your array, which is to say, initialize it.
You can also do this at the same time you define the array using C++'s array initializer syntax, but your approach is better.