原创 cin和getline輸入的一個小問題

今日在羣上有一個人問了這樣一個問題,他想在屏幕輸入一句話到str中,保留空格: #include <iostream> #include <string> using namespace std; int main() { stri