answersLogoWhite

0

How to use graphics in c plus plus?

Updated: 8/10/2023
User Avatar

AbhinavVerma5593

Lvl 1
9y ago

Best Answer

At the beginning in the header file:

#include <graphics.h>

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

9y ago

You can tell initgraph to use a particular graphics driver and mode.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How to use graphics in c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the use of header file graphics in c plus plus programming?

It has no use in C++ itself, it is only useful in Borland Turbo C++. It provides generic graphics support for Borland Turbo C++ applications.


What are the parts of c plus plus environment with drawing?

C++ has no built-in graphics methods. C++ is a machine-independent programming language, but graphics are machine-dependent. To make use of graphics of any kind, you must use a suitable graphics library. If you need cross-platform support, use a generic library.


How do you use bgi graphics of c plus plus on tft screen?

TFT or CRT doesn't make difference in using BGI graphics.


How do you take input in graphics mode in c plus plus?

C++ has no graphics ability whatsoever. C++ is a machine-independent programming language, but graphics are machine-dependent. To use graphics in C++ you must use an appropriate library. If you need cross-platform support, you must use a generic library. Each library has its own specific methods for accepting input thus you must consult the library documentation for more information on this aspect.


What are the image formats supported by c plus plus?

C++ does not provide any native support for graphics of any kind, including graphic image formats. This is because graphics are platform-specific while C++ is a generic language. You can, of course, use graphics in C++, but you need a graphics library and API that is specific to your platform and hardware. There is no generic code available as the code you use is entirely dependant upon the library.

Related questions

What is the use of header file graphics in c plus plus programming?

It has no use in C++ itself, it is only useful in Borland Turbo C++. It provides generic graphics support for Borland Turbo C++ applications.


What are the parts of c plus plus environment with drawing?

C++ has no built-in graphics methods. C++ is a machine-independent programming language, but graphics are machine-dependent. To make use of graphics of any kind, you must use a suitable graphics library. If you need cross-platform support, use a generic library.


How do you use bgi graphics of c plus plus on tft screen?

TFT or CRT doesn't make difference in using BGI graphics.


How do you take input in graphics mode in c plus plus?

C++ has no graphics ability whatsoever. C++ is a machine-independent programming language, but graphics are machine-dependent. To use graphics in C++ you must use an appropriate library. If you need cross-platform support, you must use a generic library. Each library has its own specific methods for accepting input thus you must consult the library documentation for more information on this aspect.


What are the image formats supported by c plus plus?

C++ does not provide any native support for graphics of any kind, including graphic image formats. This is because graphics are platform-specific while C++ is a generic language. You can, of course, use graphics in C++, but you need a graphics library and API that is specific to your platform and hardware. There is no generic code available as the code you use is entirely dependant upon the library.


Why graphics mode use in c?

C has nothing to do with graphics.


Explain use of graphics in C language?

C has nothing to do with graphics.


How do you print a vertical graph on c plus plus?

C++ is a generic language and, as such, has no built-in graphics capability. Graphics are platform-dependant, thus if you want to use graphics in C++ you must use a graphics library and API that caters for your hardware and platform. The API needn't be written in C++, may be generic and may be as abstract as suits your needs. For example, for Windows graphics, you'd either use generic DirectX or OpenGL API calls. But not knowing which platforms you are targeting, it's impossible to provide you with the specific code your require. Consult your IDE documentation to see which, if any, graphics libraries are provided.


Can graphics in C programming done with compilers other than turbo c plus plus?

Of course.


How can you code a curve in c plus plus?

If you mean how do you draw a curve in C++, you can't. C++ does not have any built-in graphics support of any kind. All graphics are platform-specific so, to be able to draw graphics, you need a graphics API and library suitable for your platform and hardware. As a result, the code you use will not be portable. In most graphics libraries you will draw curves as a series of arcs, so you want to look up the arc() function in your library documentation.


Can you use an image file in a C or C plus plus program?

Yes, but not in generic C++ unless you are simply reading the raw data from the image file. C++ has no built-in graphics support as graphics are platform specific. If you want to display the file you will need to use a 3rd-party platform-specific graphics API. Consult your IDE's documentation to see what, if any, graphics API is provided with your language. Cross-platform support is possible, but you really need a generic implementation of C++, such as gc++. VC++ is not ideally suited to cross-platform development.


Can you get c plus plus programming to frame the outer structure of the periodic table?

Yes you can but C++ has no built-in graphics methods, even for line-drawing. Graphics are platform-dependant so you will need a graphics library and API that suits your platform and hardware.