I have a problem with stringstream. The following code compiles with
Visual Studio 2005 under XP, but not under DOS with watcom 16 bit
compiler wcl.
content of test.cpp:
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main() {
int testint = 10;
stringstream teststream;
teststream << testint;
cout << teststream.str() << endl;
system("PAUSE");
return 1;
}
compile.bat:
wcl test.cpp /xs
the error message:
wcl test.cpp /xs
Open Watcom C++16 Optimizing Compiler Version 1.5
Portions Copyright (c) 1989-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
TEST.CPP(9): Error! E006: col(22) syntax error; probable cause:
missing ';'
TEST.CPP(10): Error! E029: col(20) symbol 'teststream' has not been
declared
TEST.CPP: 13 lines, included 7009, no warnings, 2 errors
Open Watcom C/C++16 Compile and Link Utility Version 1.5
Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
wpp TEST.CPP /xs
Error: Compiler returned a bad status compiling "TEST.CPP"
Please tell me how I can get it to compile.
> Open Watcom C/C++16 Compile and Link Utility Version 1.5
Maybe try version 1.8 which is in beta.
A lot of work has been done on C++ compatibility.
Someone who knows C++ will be along tomorrow.
Just managed to invoke wpp v1.8 and it gives the same error message.