pictures

my question is simple can you put a picture in one of your c++ programs and if you can how?
You can, but you'd need a 3rd party library, because the C++ standard library has nothing that will allow you to do that (easily).

A recommendation that gets passed around a lot and I can vouch for is SFML. It's pretty easy, especially by multimedia library standards. :)
http://sfml-dev.org/

-Albatross
You would need to use a library. I suggest SFML http://www.sfml-dev.org/index.php

Simple and fast multimedia library.

Damnit Albatross...
Last edited on
thanx
ok so one more question what do i do at that website. im new at this
download the package for your IDE and platform then follow the instructions on the site... or come back here after you've downloaded and tell us your platform, IDE, and everything that went wrong so we can try to help.
thanx but i just kinda want to know what it is cuz im clueless as you have probly noticed hahaha
ok i have looked at some tutorials and just around on the web and maybe i need to be more specific. my program has a story to it and it takes place on a ship and i just wanted to post a "small" picture of a map of the ship. thanx fer your help
please help me :(
There's not much more we can do to help you. If you want to put graphic images in a C++ program you must learn to use a graphics library. There are hundreds of tutorials on the web already so I doubt anyone here is going to write another one especially for you. Just read up on SFML, then try to write some simple graphics apps. You'll get the hang of it.
cainen172, what exactly do you need help with? Setting up SFML or programming in general?
@OP: You could try asking a more direct question on a new thread such as "How do I load an image using (INSERT LIB HERE)?" or even better "Why won't my code work? I am trying to load and display an image using (INSERT LIB HERE)"
cainen172:

Follow the tutorials on that site:

http://www.sfml-dev.org/tutorials/1.6/

The first step is downloading and installing SFML (see "Getting Started" on that page)

After that you can start writing programs with it. (see "Graphics Package" on that page)
Also if you have any questions about getting the library to work (i.e. Linking). We can answer those to. The tutorial on SFML's website is for Code::Blocks C++ but I know first hand that it is usable if you are using wxDev-C++, and I can even get it to work on a command line compiler as long as you know your way around your environment and you are using a compatible compiler version.

Remember that no matter what your issue is, someone here has the answer. We just prefer to answer questions in a way that will be the most beneficial to you in the long term.
Last edited on
ok thank you very much everyone :-) i appreciate your patience.
Topic archived. No new replies allowed.