Last active
August 29, 2015 14:26
-
-
Save paosidufygthrj/ffac1acae02fe47e8b27 to your computer and use it in GitHub Desktop.
[C++]std::istream の残りの文字列から std::string を作成
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <sstream> | |
using namespace std; | |
int main() { | |
istringstream is("01234"); | |
is.ignore(3); | |
istreambuf_iterator<char> begin(is); | |
istreambuf_iterator<char> end; | |
cout << string(begin, end) << endl; // "34" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment