Hallo,

When I add the following function to my program it crashes. I dont even need to use the function to make it crash. I compiles fine. Any ideas on what I am doing wrong?

Code:
std::string intToString(int n)
{
	std::stringstream out;
	out << n;
	std::string a = out.str();

	return a;
}
Here is the error message I get:
Unhandled exception at 0x004898a6 in HelloWorld.exe: 0xC0000005: Access violation reading location 0xcccccca4.
And it points me to this code, which is found in xiosbase at line 372
Code:
	fmtflags __CLR_OR_THIS_CALL flags() const
		{	// return format flags
		return (_Fmtfl);
		}
Thanks