我有一个名为blabla的课程。
class blabla
{
public:
void setName(const string &);
}
blabla toe;//creating an object
现在,
string foe;
cin>>foe;
toe.setName(foe);//works completely fine
但是,
string loe;
getline(cin,loe);
toe.setName(loe);//compiles but the program overflows whenever this function is accessed..