string input; input.resize(20); scanf("%s", &input[0]); //必须定好大小。遇到空格就停止读取,也就是说,如果你键入得是aaa bbb,那么实际上scanf ...
確定! 回上一頁