[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

STL and MSVC++ v5.0 colide at iostream

Posted on 1998-08-31
9
Medium Priority
?
309 Views
Last Modified: 2013-12-14
I am using STL (MSDEV) with the Microsoft Visual C++ Ver 5.0, and since it was introduced to my project I have problems with things like fopen and stuff. I tried to look deeper in the process, and found out that lower-level functions still work - _open returns a handler, but the upper level fopen receives a NULL.
I looked through the available net documentation about the MSVC++ and STL (actually for ver 4.2 but most of it stands for early releases of ver 5.0) and tried what I found: I changed the include of iosream.h to iostream (using namespace std); I switced the 'istream_iterator' lines in the istream file. I even got rid of the anoying warnings.
Still nothing.

Please help.

Tarbush
0
Comment
Question by:tarbush
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 3

Expert Comment

by:danny_pav
ID: 1171698
what warnings do you get?  what do you try to do?  What happens?
0
 

Author Comment

by:tarbush
ID: 1171699
to Danny_pav:
The comment I get is the usual ....4786.
It is removed with the #pragma directive.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1171700
I can assure you that these functions ussually do work.  This must be something you are doing wrong.  I would restore the original lines in the header files and try to see what the problem is.  Can you post your code?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 1

Expert Comment

by:arbitrary
ID: 1171701
try applying sp2
it works better with templates and STL

0
 

Author Comment

by:tarbush
ID: 1171702
to arbitrary:

what is sp2?
thanks
0
 
LVL 22

Expert Comment

by:nietod
ID: 1171703
Can you post the relevant code?
0
 
LVL 2

Expert Comment

by:Paullkha
ID: 1171704
sp2 means service pack two. The most current I know of is service pack 3. Many files for C++, VB, and on, will be replaced with this service pack. If you download from the web, a T1 line would be nice since you will need 90megs+. (10megs per cab file)

Post the code, code is key!
0
 

Accepted Solution

by:
pstg earned 100 total points
ID: 1171705
You must "wrap" the #includes inside the std namespace, so there are no collision between Microsoft stuff and STL...

0
 

Author Comment

by:tarbush
ID: 1171706
to pstg:
what do you mean by "wrap"? If you are refering the stdio.h file - I used the <stdio> and not <stdio.h> (This is a documented MSVC++ 5.0 bug).

Please advice
thanks, tarbush
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question