answersLogoWhite

0


Best Answer

C++ has no platform dependency. If a compiler exists for a platform (and few don't) code can be written for that platform. Where platforms have different methods to do the same thing, conditional compilation can be used to cater for those differences, thus the same source code can be compiled on any platform simply by changing the definitions used by the conditional compilation directives.

For instance, a program that caters for Unix and Windows platforms might contain the following conditional compilation:

#ifdef __unix__

#include <unistd.h>

#elif defined _WIN32

#include <windows.h>

#endif

The definition of __unix__ and _WIN32 must be mutually exclusive.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is platform dependency of c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

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.


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.


How can you display a circle on computer screen with the help of c plus plus programming language?

You cannot. At least not with generic C++. Graphics are platform-dependent and therefore requires a suitable API and library for your specific platform and its hardware.

Related questions

Why c plus plus is platform dependent?

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


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.


Is Visual C or Visual C plus plus platform independent?

No, M$ Windoze only.


How do you use graphicsh in c plus plus?

With platform-dependent libraries.


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

platform-dependent


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.


What is the use of visual c plus plus?

It's primary purpose is to develop programs for the Windows platform.


How is Eclipse different from C plus plus?

Eclipse is a development platform, usually used to develop Java, but it can be used to develop C++. C++, on the other hand, is a language, not a platform. As a result, the two cannot be compared correctly. Please restate the question.


How can you display a circle on computer screen with the help of c plus plus programming language?

You cannot. At least not with generic C++. Graphics are platform-dependent and therefore requires a suitable API and library for your specific platform and its hardware.


How do you do a 3D character like A using c plus plus 2010?

C++ is a generic, cross-platform programming language, while 3D graphics are platform-specific. To draw graphics of any kind you need a low-level API and library specific to your platform and hardware.


How do you draw a sphere in computer graphics using C plus plus?

C++ is a generic, cross-platform language, but graphics are platform-dependant. thus C++ has no built-in methods for graphics output. To draw graphics in C++ you need a low-level API and library specific to the platform and hardware you intend to target. Some libraries are highly abstract and therefore support cross-platform development, but most are platform-specific. Consult the documentation that came with your library.


What are the most prominent features of C plus plus?

Object oriented programming. General purpose. Cross-platform.