So,in my head,this code should simply draw my image. When I run it though,my console window starts spitting random characteres,and visual studio points me to this line
Your exception is being thrown from line 10 (my guess is your file path is invalid). Your not testing to see if the file was loaded sucessfully either. Try doing something like:
just to see what happens,and I got the same exact error. All hell breaks loose in the console,and nothing shows up in the window. The path,though,is correct.
SFML doesn't come in different flavors for different compilers, so "SFML 2.1 for Visual Studio 2012" doesn't make much sense to me.
Did you compile SFML yourself or are you using a pre-built library?
There is nothing in this code that would cause the problem you indicate (whether or not the file was successfully read,) so one assumes the problem is somewhere in the toolchain (and history has shown that to often be the case.)
I guess this is a pre-built library,right? I'm not exactly sure what these words mean, I'm a total beginner,with only high-school programming background.
Yes, those are pre-built libraries. I had forgotten Laurent was officially supplying them, now. (For a long time they were not supplied while v2 was in development.) They aren't different flavors of SFML, though, they are all compiled from the same source.
I usually just pull the source from the github repository and compile for myself.
Assuming you've downloaded the correct version of the pre-built library as you say you have, you should again check to see if you're compiling with the debug libraries in release mode or vice versa.
From the instructions you linked to:
It is important to link to the libraries that match the configuration: "sfml-xxx-d.lib" for Debug, and "sfml-xxx.lib" for Release. A bad mix may result in crashes.