I've just read a few books on C++ and learned a lot about the language, but the books never mentioned how to add sound and visuals to my programs.
I "think" that stuff is all stored in libraries, but... what tutorial should I read next to learn how to implement graphics/sound into my programs?
Also, I do just use a library right? or is it relatively easy to write my own graphics/sound library?

Comments
Finally!!! An intelligent question about graphics!

No you use what someone geniuses already have written for you. It will
be pretty hard to create your own graphics command, that does not
encapsulates other's functions. I would suggest to start with SDL.
This link will be
a good start.

The reason that subject is not covered in any books on C++ is that there is no standard way to draw graphics or play sounds because C++ is a multi-platform language and graphics and sound hardware/drivers are platform specific.

You will need a library but it will have to be a 3rd party library be that QT, wxWidgets, WIN32 API or some other library. You will have to make the decision on which library to use most of the popular ones have fairly good on line documentation and tutorials.

It is not at all easy to write your own graphics and sound library.

I've just read a few books on C++ and learned a lot about the language, but the books never mentioned how to add sound and visuals to my programs.

That's because C++ doesn't actually do graphics or audio. It's simply a programming language.

I "think" that stuff is all stored in libraries, but...

Very true. You find the libraries you want to use and add it to your C++ programming environment. Then you have graphics capability.

what tutorial should I read next to learn how to implement graphics/sound into my programs?

This I can't help with. But someone will come along with some good advice (and others with bad -- hope you can tell the difference :icon_wink:)

Also, I do just use a library right? or is it relatively easy to write my own graphics/sound library?

It is very difficult to write your own libraries. Stick with a good package that comes well recommended.

This article has been dead for over six months. Start a new discussion instead.