Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Platform independent or not

Posted on 2002-03-14
7
Medium Priority
?
357 Views
Last Modified: 2012-05-04
Is C++ a platform indepented languange or not ?
 if yes why ?
 one of my friend argude about it as plateform independent languge , any one know about it in detail
0
Comment
Question by:yasinmon
[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
7 Comments
 
LVL 12

Accepted Solution

by:
pjknibbs earned 100 total points
ID: 6864396
The language itself is platform independent, in that there is a standard way it's supposed to work across all platforms. However, there's no platform-independent way in C++ of, say, opening a window on a GUI or reacting to mouse clicks--these are all implemented via specific APIs on specific platforms, so a C++ program written for a Mac will not compile and run on a Windows PC. (However, a C++ program written for a UNIX command-line might well compile as a Windows console-mode application--it just wouldn't be able to do anything operating system specific).

Note that even a cross-platform language like Java would suffer this problem if it weren't for the fact the language definition specifies a generic way of doing things normally done by the operating system--in other words, Java has its own functions with their own syntax for doing things you would need to use the operating system calls for in C++.
0
 
LVL 6

Expert Comment

by:jwenting
ID: 6864879
to summarise, yes and no.
The core language is platform independent but the libraries used for each OS are not and neither are the compiled binaries (even when using no platform specific code).

Many companies and groups wanting a platform independent program end up writing a core that is indeed platform independent (needing only recompilation on the new platform) plus a set of libraries that provide the platform-dependent calls via an interface that is identical for each platform.
They can then ship the core + the library for the platform the customer orders for each hardware/OS supported.
0
 
LVL 11

Expert Comment

by:griessh
ID: 6865135
C++ is completely platform independent. You can write C++ programs even on paper :-)

The platform comes into the game when you use libraries that have access to your specific system. That is usually graphics, filesystem and peripherals.

======
Werner
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6870355
Please maintain your open questions:

Questions Asked 7
Last 10 Grades Given B  
Question Grading Record 1 Answers Graded / 1 Answers Received

Thanks,
Anthony
0
 

Author Comment

by:yasinmon
ID: 6877471
hai  griessh  
   your funny guy , I agreed
0
 
LVL 11

Expert Comment

by:griessh
ID: 6955372
Dear yasinmon

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to accept

     "pjknibbs"

comment(s) as an answer.

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points. The link to the Community Support area is: http://www.experts-exchange.com/commspt/

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 6979087
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

609 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