www.digitalmars.com         C & C++   DMDScript  

c++.stl.port - stlport simple string IO fails

reply Larry Brasfield <larry_brasfield snotmail.com> writes:
Could somebody try this simple program and see
whether it crashes with an access violation?

I can't believe something this simple is broken
in stl_port, but when I built it according to
the directions, everything went fine.

Thanks in advance.

#include <iostream>
using std::cout;
using std::cin;

#include <string>
using std::string;

int main()
{
  int I;
  string s;
  cout << "Enter a number: ";
  cin >> I;
  cout << "Enter a token:";
  cin >> s;
}

-- 
-Larry Brasfield
(address munged, s/sn/h/ to reply)
Nov 03 2002
parent reply Christof Meerwald <cmeerw web.de> writes:
On Sun, 3 Nov 2002 14:09:49 -0800, Larry Brasfield wrote:
 I can't believe something this simple is broken
 in stl_port, but when I built it according to
 the directions, everything went fine.

Oops, I got the _FILE_I_end function wrong... :-( A patch is available at http://cmeerw.org/files/dm/stlport-dm830.diff (which also adds DMC support to src\fstream.cpp) You also need to get http://cmeerw.org/files/dm/patch.exe if you don't already have patch installed on your system. Then cd to \dm\stlport and invoke: patch -sp1 <..\stlport-dm830.diff to apply the patch. bye, Christof -- http://cmeerw.org JID: cmeerw jabber.at mailto cmeerw at web.de ...and what have you contributed to the Net?
Nov 05 2002
next sibling parent Larry Brasfield <larry_brasfield snotmail.com> writes:
In article <aq9h21$194$1 digitaldaemon.com>, 
Christof Meerwald (cmeerw web.de) says...

 A patch is available at http://cmeerw.org/files/dm/stlport-dm830.diff (which
 also adds DMC support to src\fstream.cpp)
 
 You also need to get http://cmeerw.org/files/dm/patch.exe if you don't
 already have patch installed on your system.
 
 Then cd to \dm\stlport and invoke:
 
 patch -sp1 <..\stlport-dm830.diff

Thanks for the follow-up, Christof. I will apply your patch forthwith and report back if that does not cure the problem. By the way, the problem only occurs when cin is associated with the console. If I redirect input from a file, the >> string operation works fine. -- -Larry Brasfield (address munged, s/sn/h/ to reply)
Nov 05 2002
prev sibling parent Dimitri Kaparis <dkaparis universalstudyhelper.com> writes:
In article <aq9h21$194$1 digitaldaemon.com>, Christof Meerwald says...
On Sun, 3 Nov 2002 14:09:49 -0800, Larry Brasfield wrote:
 I can't believe something this simple is broken
 in stl_port, but when I built it according to
 the directions, everything went fine.

Oops, I got the _FILE_I_end function wrong... :-( A patch is available at http://cmeerw.org/files/dm/stlport-dm830.diff (which also adds DMC support to src\fstream.cpp) You also need to get http://cmeerw.org/files/dm/patch.exe if you don't already have patch installed on your system. Then cd to \dm\stlport and invoke: patch -sp1 <..\stlport-dm830.diff to apply the patch. bye, Christof

Hello, I have been able to fix that problem using the patch, but why isn't it posted on the Digital Mars web site? The latest stl port download there has the same problem and I had to hunt through the newsgroup to find the solution. Regards, Dimitri
Dec 05 2002