#include <iostream>
#include <limits>
#include <iostream>
#include <fstream>
#include <iostream>
int main() {
std::cout << "Enter some text: ";
// 忽略输入流中的前 5 个字符
std::string remainingInput;
std::cin.ignore(1);
std::getline(std::cin, remainingInput);
std::cout << "Remaining input: " << remainingInput << std::endl;
std::cin.putback(remainingInput[0]);
getline(std::cin,remainingInput);
std::cout << "Remaining input: " << remainingInput << std::endl;
return 0;
}
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)