Read into std::string using scanf

this can work

char tmp[101];
scanf("%100s", tmp);
string a = tmp;

Leave a Comment