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...