E
Edward Diener
If you run this simple console program after building it on VC++ .NET 2003,
you will see the error message, "Error getting initial stream position",
from the attempt to use the std:stream::tellp() method to get the output
stream position of a std::stringstream. I can see no reason for this error
and deem it a bug in VC++ .NET 2003. If anyone knows of a workaround or a
fix for this, I would appreciate finding out about it. BTW, where do I
officially report a bug in VC++ .NET 2003 to Microsoft ?
#include "stdafx.h"
#include <sstream>
int _tmain(int argc, _TCHAR* argv[])
{
std::stringstream stream;
std::stringstream:os_type begpos;
stream.flush();
if (!stream)
{
std::cout << "\r\nError flushing stream\r\n";
}
begpos = stream.tellp();
if (begpos == std::stringstream:os_type(-1))
{
std::cout << "\r\nError getting initial stream position\r\n";
}
char buffer[256];
std::cout << "\r\nPress any character and hit enter to end program\r\n";
std::cin.getline(buffer,256);
return 0;
}
you will see the error message, "Error getting initial stream position",
from the attempt to use the std:stream::tellp() method to get the output
stream position of a std::stringstream. I can see no reason for this error
and deem it a bug in VC++ .NET 2003. If anyone knows of a workaround or a
fix for this, I would appreciate finding out about it. BTW, where do I
officially report a bug in VC++ .NET 2003 to Microsoft ?
#include "stdafx.h"
#include <sstream>
int _tmain(int argc, _TCHAR* argv[])
{
std::stringstream stream;
std::stringstream:os_type begpos;
stream.flush();
if (!stream)
{
std::cout << "\r\nError flushing stream\r\n";
}
begpos = stream.tellp();
if (begpos == std::stringstream:os_type(-1))
{
std::cout << "\r\nError getting initial stream position\r\n";
}
char buffer[256];
std::cout << "\r\nPress any character and hit enter to end program\r\n";
std::cin.getline(buffer,256);
return 0;
}