I have this code that work's well under VS6 but gives me errors in VS2010 :
void CGreatString::operator>> (char * lpszDest)
{
strcpy (lpszDest, str());
rdbuf()->freeze(0);
}
I have found this for something similar to my problem, but it still didn't work ...
So from what I have understand, ostrstream is deprecated in VS2010, so I tried this :
void CGreatString::operator>> (char * lpszDest)
{
ostringstream os;
string str = os().str(); //Error 1 and 2
strcpy (lpszDest, str.c_str());
os.rdbuf()->freeze(0); //Error 3
}
But I still get errors :
1- error C2064: term does not evaluate to a function taking 0 arguments
2- error C2228: left of '.str' must have class/struct/union
3- error C2039: 'freeze' : is not a member of 'std::basic_stringbuf<_Elem,_Traits,_Alloc>'
Thanks!
From the comments on my questions, I've been able to correct it. Thanks!