I think it's a simple syntax error, but I can't seem to fix it.
Code:
#include <iostream>
using namespace std;
class Town
{
public:
Town(string Name): name(Name) {} //constructor
protected:
string name;
};
void cho_destin(Town& towns[], int& location) //function that causes ERROR
{}
Town towns[6] = {Town("Bronx"), Town("Ghetto"), Town("Central Park"), Town("Manhattan"),
Town("Coney Island"), Town("Brooklyn")};
int location = -1; //location ( -1 is starting point)
int main()
{
cho_destin(towns[6], location); //prompts user to choose destination
system("PAUSE");
return 0;
}
Thx for the help! ^^