我對空的ostringstream調用tellp的標準行爲有疑問。我有一個函數foo它調用tellp的第一件事: void foo(std::ostream& os)
{
std::ostream::pos_type pos = os.tellp();
// do some stuff.
}
int main()
{
std::ostringstream o
我想用這個段從Mr-Edd's iostreams article打印的std ::某處堵塞。 #include <iostream>
#include <iomanip>
#include <string>
#include <sstream>
int main()
{
std::ostringstream oss;
// Make clog use the b