I have a function called generate_all_paths, defined as such:
template <int size>
void generate_all_paths(vector<string> maze[][size], int x, int y) {
....
}
I am trying to call it in my main function as so:
int main() {
string s;
ifstream mazefile("maze.txt");
if (!mazefile) {
cout << "File not found. Please try again." << endl;
}
while (getline(mazefile, s)) {
mazevec.push_back(s);
}
generate_all_paths(mazevec, 0, 1);
return 0;
}
where mazevec is vector<string> mazevec;
But my IDE says that my call to generate_all_paths in main does not match the function definition. I'm a little confused why this is happening. mazevec
is a vector string, so shouldn't the parameter data types match up?