I'm trying to make 2D map but I have problem with setting a color for all elements which value is 'a'
is it possible in any way??
^^^
if(map[a][b]=='a')
set color ..... ;
void map_create(int lenght, int wide,char map[][100])
{
for(int i=0; i<lenght; i++)
{
for(int i2=0; i2<wide-1; i2++)
{
if(i2==0)
{
map[i][i2]='x';
continue;
}
if(i2%2!=0)
{
map[i][i2]=' ';
continue;
}
if((i==0 || i==lenght-1) || (i2==0 || i2==wide-2))
map[i][i2]='x';
else
map[i][i2]=' ';
}
}
map[2][2]='o';
if(tab[i][i2]=='o')
{
int problem_is_here;
}