我试图确定这个编译器错误背后的原因是'没有匹配的函数调用到 address::set_street(); 任何建议将不胜感激 - 谢谢
#include <iostream>
#include <string>
using namespace std;
class address {
public:
address();
void set_street(string street) {
streetname = street;
};
string get_street() {
return streetname;
};
void set_parish(string parish) {
parishname = parish;
}
string get_parish() {
return parishname;
}
void set_country(string country) {
countryname = country;
}
string get_country() {
return countryname;
}
private:
string streetname;
string parishname;
string countryname;
};
int main(int argc, char* argv[]) {
system("color 0c");
address enteredaddress;
cout<<"Enter street name" <<endl <<endl;
cin >>enteredAddress.set_street();
cout<< endl;
system ("pause");
return 0;
}