Writing a portable, clean C++ code..

Posted on 2003-02-25
Medium Priority
Last Modified: 2006-11-17

  My development platform is Linux with gcc-3.2.2. My g++ compiler keep complaining about some of my c++ code is deprecated cause my code includes some old header files. I don not wish to turn off the warning. My question is as follow:

#if defined (<USING_NEW_C++_HEADER_MACRO?>)
#  include <newheader>
#  include <oldheader>

Is there any defined macro that can tell me which style of syntax supported by g++ compiler???

Question by:zollen
1 Comment

Accepted Solution

bgcboyus earned 200 total points
ID: 8047116
First I need to Know which includes you are using
Second if your are using something like #include<iostream.h>
try #include<iostream>
this maybe be the problem. But to be honest I really can't tell you without seeing the exact code you are using. Post the code of just the includes and then I can tell you what the deal is.

Here are some samples:
old syntax
new syntax

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

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Planning to migrate your EDB file(s) to a new or an existing Outlook PST file? This video will guide you how to convert EDB file(s) to PST. Besides this, it also describes, how one can easily search any item(s) from multiple folders or mailboxes…

616 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