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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

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…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

752 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