|
From: Chad S. <ho...@ho...> - 2000-12-07 16:44:33
|
Interesting.. I decided to actually test the code I was promoting, and I
found a problem with the compiler.. It seems to bomb out on this bit of
code..
#include <string>
#include <iostream>
#include <strstream>
using namespace std;
int main(int argc, char *argv[])
{
string MyString;
strstream MyStream;
((MyString += "John has ") += "4") += " apples!";
cout << MyString << endl;
MyStream << "John has " << 10 << " apples!";
MyString = MyStream.str();
cout << MyString << endl;
return 0;
}
But I can compile the exact same code using the GNU G++ compiler without any
errors or warnings or crashes.
So this most likely explains Gregor's problems.. But the fault is with the
compiler, as the Standard C++ library dictates this functionality.
Chad Simmons
_____________________________________________________________________________________
Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
|