标签:std ios stream fst basic blog str span put
1.输出“输入的内容”
// basic file operations #include <iostream> #include <fstream> #include <string> using namespace std; std::istream& func(std::istream &is) { std::string buf; while (is >> buf) std::cout << "output = " << buf << std::endl; is.clear(); return is; } int main() { std::istream &is=cin; func(is); }
标签:std ios stream fst basic blog str span put
原文地址:http://www.cnblogs.com/liez/p/6881067.html