我试图向用户询问字符串流,然后将其转换为字符串,以便我可以将其传递给函数参数。我怎样才能做到这一点 ?:
string Nm;
stringstream ss;
cout << " Please enter where the charge was made " << endl;
cin >> Nm;
ss.str();
cca.doCharge(Nm);
我试图向用户询问字符串流,然后将其转换为字符串,以便我可以将其传递给函数参数。我怎样才能做到这一点 ?:
string Nm;
stringstream ss;
cout << " Please enter where the charge was made " << endl;
cin >> Nm;
ss.str();
cca.doCharge(Nm);