Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

problem with stringstream

77 views
Skip to first unread message

soe...@googlemail.com

unread,
Aug 24, 2008, 5:26:40 PM8/24/08
to
Hi!

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.

tim_c

unread,
Aug 24, 2008, 9:08:23 PM8/24/08
to
soe...@googlemail.com wrote:

> 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.

tim_c

unread,
Aug 24, 2008, 9:13:09 PM8/24/08
to
tim_c wrote:
> soe...@googlemail.com wrote:
>
>> Open Watcom C/C++16 Compile and Link Utility Version 1.5
>
> Maybe try version 1.8 which is in beta.
>


Just managed to invoke wpp v1.8 and it gives the same error message.

DanielC

unread,
Aug 25, 2008, 4:22:44 PM8/25/08
to
Sorry, stringstream hasn't been implemented yet. Check out the old strstream,
it may do something of what you want.
0 new messages