Hi Laurent. Thanks for your reply. Apologies for not formatting code block correctly.
When I ran the debugger it gave the following output, I don't know if this will help but here goes:
output screen from Debug:
'example2.exe': Loaded 'C:\Users\Bill\Documents\Visual Studio 2010\Projects\example2\Debug\example2.exe', Symbols loaded.
'example2.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Users\Bill\Documents\Visual Studio 2010\Projects\example2\Debug\sfml-graphics-2.dll', Binary was not built with debug
information.
'example2.exe': Loaded 'C:\Users\Bill\Documents\Visual Studio 2010\Projects\example2\Debug\sfml-window-2.dll', Binary was not built with debug
information.
'example2.exe': Loaded 'C:\Users\Bill\Documents\Visual Studio 2010\Projects\example2\Debug\sfml-system-2.dll', Binary was not built with debug
information.
'example2.exe': Loaded 'C:\Windows\SysWOW64\msvcr100.dll', Symbols loaded.
'example2.exe': Loaded 'C:\Windows\SysWOW64\msvcp100.dll', Symbols loaded.
'example2.exe': Loaded 'C:\Windows\SysWOW64\opengl32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\glu32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded.
'example2.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
'example2.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\ig4icd32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\version.dll', Cannot find or open the PDB file
'example2.exe': Unloaded 'C:\Windows\SysWOW64\version.dll'
'example2.exe': Loaded 'C:\Windows\SysWOW64\dinput.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\hid.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\wintrust.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\crypt32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\msasn1.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\clbcatq.dll', Cannot find or open the PDB file
First-chance exception at 0x72621f34 (msvcr100.dll) in example2.exe: 0xC0000005: Access violation reading location 0x023c5000.
Unhandled exception at 0x72621f34 (msvcr100.dll) in example2.exe: 0xC0000005: Access violation reading location 0x023c5000.