answersLogoWhite

0

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

13y ago

What else can I help you with?

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.

Trending Questions
Why on load or off load tap changer is always connected in the primary side of a power or distribution transformer. And why distribution and power transformer are rated MVA? What was Eli Whitney's cotton gin made of? Who invented subways? Who first invented techonology? What is outline function in c plus plus language? How do you use conditional in a sentence? What types of plugs are used in houses and what is the voltage and frequency of the household AC electrical service which is supplied? Is vlsi design a theory or derivation subject? Which terminal does the current flow in a circuit? Sentence with word machine? How are Microphones and ears alike? What are nested frames? How a 1N4007 diode become a 1000V diode and 1N4005 become a 600V diode? How many amps will a 55 KW motor take? What are the various phases of an instruction cycle Give the micro operation of fetch and decode phases? Palindrome in c plus plus? What is the reason for using 250 percent multipler for sizing motor circuit breakers in NEC? Will 2.5v pulse voltage damage the fuel injectors when it should be 3v - 1.0v e32 m70 v12 with two ECM elec control module switched n still same voltage from both sides whats cause high pulse voltage? Administers programs aimed at protecting the environment improving waterway navigation flood and beach erosion control and water resources development? What is the most common method of communicating the shape and size of an object that is intended for manufacture?