Solved

Platform independent or not

Posted on 2002-03-14
7
347 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
7 Comments
 
LVL 12

Accepted Solution

by:
pjknibbs earned 25 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now