1 //===----------------------------------------------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 // <strstream> 11 12 // class strstreambuf 13 14 // int overflow(int c); 15 16 #include <iostream> 17 #include <string> 18 #include <strstream> 19 main()20int main() { 21 std::ostrstream oss; 22 std::string s; 23 24 for (int i = 0; i < 4096; ++i) 25 s.push_back((i % 16) + 'a'); 26 27 oss << s << std::ends; 28 std::cout << oss.str(); 29 oss.freeze(false); 30 31 return 0; 32 } 33