Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ C+中是否有类似于istream::putback的字符串函数+;?_C++_String_Function_Istream - Fatal编程技术网

C++ C+中是否有类似于istream::putback的字符串函数+;?

C++ C+中是否有类似于istream::putback的字符串函数+;?,c++,string,function,istream,C++,String,Function,Istream,我知道istream::putback函数允许我们将从输入流中获得的最后一个字符放回输入流 字符串是否有类似的函数 如果不是,如何将从输入字符串中获取的最后一个字符放回输入字符串 谢谢 您可以使用操作符+=这没有多大意义。字符串不是流。从字符串中获取的最后一个字符仍然存在。深入了解你的问题的更多细节,最好是用一个。

我知道istream::putback函数允许我们将从输入流中获得的最后一个字符放回输入流

字符串是否有类似的函数

如果不是,如何将从输入字符串中获取的最后一个字符放回输入字符串


谢谢

您可以使用
操作符+=
这没有多大意义。字符串不是流。从字符串中获取的最后一个字符仍然存在。深入了解你的问题的更多细节,最好是用一个。