I want to check if 2d array is equal to int variable but the problem "ISO C++ forbids comparison between pointer and integer [-fpermissive]" shows up.
#include <bits/stdc++.h>
using namespace std;
const int height = 50;
int stone = 1;
int dot = 2;
int blank = 0;
void draw(int x, int t)
{
int width = x;
int board[height][width];
for(int i=0;i<width;i++)
{
board[i][0]=blank;
}
board[t][0]=dot;
for(int y=0;y<height;y++)
{
for(int j=0;j++;j<width)
{
if(board[y][j-1]==dot && board[y][j+1]==blank)
{
board[y+1][j-1]=stone;
board[y+1][j+1]=stone;
}
else
{
board[y+1][j]==board[y][j];
}
cout<<board[y+1][j];
}
cout << endl;
}
}
I dont really know what to do edit: here is full code.