473,378 Members | 1,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

STL headers in VC.Net

I have an old C++ program that used "complex.h". It appeared an error when
it was recompiled by MS VC.NET 2003. The compiler could not find the file
"complex.h", but it will be fine if <complex> and "using namespace std" were
used. There is no problem if it is compiled by Borland CBuilderX. I don't
want to modify the program because it will be a hard work. Any idea?

Dennis
Jul 22 '05 #1
3 1249
Hi,

".h" is old all the STL stuff has been renamed to <vector> <list>, <sstream>
for stringstream stuff etc.
It is recommended to change it or just compile with an old compiler. This is
true for both VC and g++. Also you have to include "using namespace std" or
add "std::".

(Note that stringstream has changed a bit previously you had to call a
routine explicitely with zero to deallocate memory, now it is done
automatically).

In short, either compile with an old compiler or modify the program ( a
simple but job but it might still be a lot of work).

Regards, Ron AF Greve.

"Wei-Chao Hsu" <D8******@mail.ntust.edu.tw> wrote in message
news:ch**********@netnews.hinet.net...
I have an old C++ program that used "complex.h". It appeared an error when
it was recompiled by MS VC.NET 2003. The compiler could not find the file
"complex.h", but it will be fine if <complex> and "using namespace std"
were used. There is no problem if it is compiled by Borland CBuilderX. I
don't want to modify the program because it will be a hard work. Any idea?

Dennis

Jul 22 '05 #2
Wei-Chao Hsu wrote:
I have an old C++ program that used "complex.h". It appeared an error
when it was recompiled by MS VC.NET 2003. The compiler could not find the
file "complex.h", but it will be fine if <complex> and "using namespace
std" were used. There is no problem if it is compiled by Borland
CBuilderX. I don't want to modify the program because it will be a hard
work. Any idea?


Write a complex.h file with this:

#include <complex>
using std::complex;

--
Salu2
Jul 22 '05 #3
In article <ch**********@netnews.hinet.net>,
Wei-Chao Hsu <D8******@mail.ntust.edu.tw> wrote:
I have an old C++ program that used "complex.h". It appeared an error when
it was recompiled by MS VC.NET 2003. The compiler could not find the file
"complex.h", but it will be fine if <complex> and "using namespace std" were
used. There is no problem if it is compiled by Borland CBuilderX. I don't
want to modify the program because it will be a hard work. Any idea?


If you really must, then why not create a complex.h or your own
which #include's <complex> and then using namespace std's it?
--
Greg Comeau / Comeau C++ 4.3.3, for C++03 core language support
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
Jul 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Philip Ronan | last post by:
OK, here's my 2p worth: === Q. Why am I getting the error message 'Headers already sent'? A. PHP produces this error message when you try to set a header for a web page after you have already...
3
by: sam | last post by:
Hello Group, Havent had luck posting it to microsoft.public.dotnet.framework.aspnet.datagridcontrol group. Excuse me for the cross posting. I have a datagrid which needs to be split into multiple...
71
by: Christopher Benson-Manica | last post by:
At what point was the .h dropped from the STL headers? I just had a discussion yesterday with my boss, who said he wanted .h on all the STL includes, despite me protesting that it was not...
1
by: stuart | last post by:
Hi, Can anybody tell me if it is possible to add your own headers through this class. The documenttion seems to be a bit ambiguous, for example the overview of the methods says Specifies the...
3
by: Jacky | last post by:
hi, I am trying to view the custom headers in an ASP.NET page. I am able to view all the standard headers using the method Request.Headers.Get(). But if i set a custom header using...
1
by: Ale News | last post by:
Hi to All.. I must add some custom headers HTTP and then i would to read them.. I used the AppendHeader Method to add my headers but when i try to read the headers i can't see my custom ones.....
2
by: fhtino | last post by:
Hello, I'm trying to create an email message with particular headers. A piece of code: SmtpClient smtp = new SmtpClient("192.168.x.y"); MailMessage msg = new MailMessage("from@xxxxxxx",...
5
by: Milos Prudek | last post by:
I perform a XML-RPC call by calling xmlrpclibBasicAuth which in turn calls xmlrpclib. This call of course sends a HTTP request with correct HTTP headers. The response is correctly parsed by...
4
by: sadieslc | last post by:
I'm working on a PHP script, and the info from the form shows up in the headers of the email that I receive, but it doesn't show up in the body of the email. Can you please help me figure out what...
6
Markus
by: Markus | last post by:
Things to discuss: Headers What are they? What does PHP have to do with headers? Why can they only be sent before any output? Common causes
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.