Call an image from the command prompt to use while coding at .cpp file

I am trying to load an image via just calling the filename. I searched to find out how to do that but unfortunately I could not. It might be really easy thing to do but I am pretty new in C. Thanks for help in advance...
Not sure exactly what u r looking for. If u mean to just open the file as a double click u can use system():

system("mypic.bmp");

If u'r looking to actually display that pic in the cmd itself that is a whole other can of worms notwithstanding, the cmd supports only 8bit color...

Otherwise I suggest 'Allegro' which has many tutorials and is free.
Last edited on
When you say load an image you must clarify your intentions.

What do you intent to do with the loaded image? Just read it and process it, display it etc?

Basically core C/C++ does not have any support for image manipulation but depending on your needs you can find libraries (which use C/C++) which have support for this.

So be more specific
Topic archived. No new replies allowed.