源碼 #include <strstream> #include <iostream> using namespace std; int main() { strstream* s = new strstream(); cin>> s ; cout << "test is " << s << endl; return 0; } 編譯 gcc -o test test.cpp 報錯 C:\Dev-Cpp\include\c++\3.4.2\backward\backward_warning.h #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.