Read into std::string using scanf September 8, 2023 by Tarik this can work char tmp[101]; scanf("%100s", tmp); string a = tmp;