0

I have this code.

http://pastebin.com/guZ7Svs4 (Stack overflows code methods were giving me trouble)

It compiles fine but it won't run. It works fine without the image loading. The image.png file exists.

MSCV2010 Express gives me this error.

Unhandled exception at 0x76f015de in program.exe: 0xC0000005: Access violation reading location 0x00000014.

user701329
  • 127
  • 2
  • 7

1 Answers1

0

First, the image addon must have PNG support. But it probably does.

"C:\Users\Charles\Downloads\image.png"

You need to change the \ to \\ or / because as-is, you have invalid escape sequences. Preferably use /, as it is cross platform.

Also, you should read this to get answers to future questions you will probably have.

Matthew
  • 47,584
  • 11
  • 86
  • 98