Why does it say it has no member?
void Tree::BFS(int row, int col, int src, int dest, int v, int pred[], int dist[]) {
int num = board.get_checker_removed_num();
int INT_MAX;
if (num == 15) { return true; }//base case
queue<int> q;//a queue to maintain queue of vertices
bool *visited = new bool[v];// bool array to mark visited nodes
for (int i = 0; i < v; i++) {//initialize starting value
visited[i] = false;//nodes that has not been visited yet
dist[i] = INT_MAX;//we use max int as initial distance, so we will not have any problems calculating min. distance
pred[i] = -1;// node does not have pred.
}
int counter = 0;//intialize counter(to count how many nodes)
visited[src] = true;//initialize values for starting src node
dist[src] = 0;//first node from src to src is 0
q.push_back(src);//add starting node into the queue
counter++;//counter + 1 for every node that it goes thru
while (!q.empty()) {//iterate to all elemements of the queue
int u = q.front();//take front node from the queue
q.pop_front();//remove node from list
for (int i = 0; i < adj[u].size(); i++) {//Check all adjacent nodes for current node u
if (visited[row][col] == false) {// If node is already visited we do not need to use it again
visited[row][col] = true;// Mark node as visited
dist[[row][col]] = dist[u] + 1;// Distance will increase with one
pred[[row][col]] = u;
q.push_back([row][col]);// Add the node at the end of the queue
counter++;//for every node added, increase counter
if ([row][col] = dest) { return true; }
}
}
}
return false;
}
error: 'class std::queue<int>' has no member named 'push_back'
error: 'class std::queue<int>' has no member named 'pop_front';