answersLogoWhite

0

Is c plus plus platform independent?

User Avatar

Anonymous

12y ago
Updated: 8/17/2019

Yes. Code must still be written specifically to suit each platform, however C++ itself is not platform dependant. To port code between platforms, the source code needs to employ compiler directives (#ifdef/#ifndef) to filter the required code to suit the current platform, and the code must be compiled separately upon each platform. By contrast, Java need only be compiled once on any platform, and the resultant byte code can then be interpreted and executed upon any machine that supports a Java Virtual Machine implementation. This makes it much easier to produce cross platform applications, but performance will suffer as a result of the interpretation.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Is Visual C or Visual C plus plus platform independent?

No, M$ Windoze only.


Why c plus plus is platform dependent?

C++ is not platform dependent. The implementation is, but not the language.


Is cloud computing is platform dependent or independent?

c is platform dependent


Why java is platform independent and also prove how it is possible?

WHY MEANS the java is a platform independent language for the sake of it has its own platform to run the program it doesn't require any platforms like c and C++


Is it c plus plus support by window 7?

C++ is not platform-dependent. All you require is a compiler that supports the platform. Platform-specific compilers will generally include platform-specific headers and libraries.


How do you get the c plus plus standard library on your compiler?

platform-dependent


How do you use graphicsh in c plus plus?

With platform-dependent libraries.


Is assembly harder than C plus plus?

yes. coz assembly is procedural orinted , due to rules n regulations and restriction which make program lengthy , cumbersome, platform independent , project infeasibility,......


How do you write platform independent C code?

Platform-Independent code, is a code that can run on any Operating System. So to write Platform-Independent codes, don't use codes that can work ONLY in the OS you program it in. w4r3_w01f at live dot com


What is feature that supported in c c plus plus and java but not in net?

C, C++ and Java are cross-platform languages. NET is for Windows-only.


Is platform independent feature means java can be run on windows XP and windows 7 but c or c plus plus does not?

No. The term platform independence in Java does not mean that any other programming language cannot be run in multiple OS platforms. Actually platform independence means that the java code can be run in multiple platforms with little or no customization. The code that can execute in a Windows platform can run as it is in a Linux box, whereas other programming languages need to be customized based on the platform they will be implemented in.


Is c plus plus platform dependent or platform independent?

The language itself is platform independent. However, specific implementations may be platform dependant. For instance, code written with Microsoft Visual C++ is generally intended to be compiled upon Windows platforms only, not Linux or Mac platforms. Although pre-compiler directives can filter machine specific code to suit the current platform, programmers need to be careful to avoid implementation-specifics when porting code to other compilers. If code is intended to be portable, it's better to use an implementation that conforms to the ISO standard, and that has implementations for all the intended platforms to accommodate platform-specific code.