Can anyone please tell me how to use the built in graphics in c++.Is there any tutorial on this?Which graphics will be suitable for using in c++?If there is any tutorial on this,please give the link.

Thanks in advance.

C++ doesn't have any built in graphics. There are moves afoot, heavily driven by Herb Sutter, to add graphics to a future C++ standard (C++ 17, perhaps).

If you want to show somethig on screen, ultimately you ask the operating system to ask the graphics driver to do it for you. This is how all (modern) programming languages do it. In C++, you can interact with the graphics card yourself (massively low-level, don't try it) or ask the operating system to do it (so start reading up on your operating system APIs), or you can get another library (for example, SFML, SDL, Cairo); you use that library, it talks to the operating system for you.

Do you actually want to do serious graphics, or do you want to make GUIs? If the latter, a "widget toolkit" might be what you're looking for.

can I use graphics.h in c++? Is there any tutorial on using this with example?

graphics.h was a header originally provided with a particular C++ compiler, about twenty five years ago, for doing simple graphics on DOS. Being a header, it of course came with a library behind it to link against. A library for DOS, which was a kind of operating system from before you were born, I'm guessing.

So you've asked me for a simple graphics library that uses a header named "graphics.h"

That's a remarkably specific request to make. I'm going to guess that you use windows. As chance would have it, someone has made a windows graphics library for C++ that uses a header named "graphics.h"

http://www.cs.colorado.edu/~main/cs1300-old/cs1300/doc/bgi/bgi.html

I suspect you'll have trouble using it; you really should look at a modern simple graphics library instead.

I haven't understood the term "Modern Simple graphics Library". Can u please explain it.I want to do simple graphics work in codeblocks using c++. Which will be the best for me?

is cairo better than opengl? I am totally new. Which will be better for me?

If you make by turbo C++, you can use graphics.h library. And with Visual Studio C++ you can find WINBGI library to use graphic. Or you learn about OpenGL...

As someone totally new, you'd do better to start by learning and getting experience in programming before you moved on to graphics with C++. If you want to skip ahead, Cairo would (probably) be a better choice for a beginner than openGL, but it does depend on what you actually want to do. What do you want to show on the screen?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.