What compiler are you using, and do you have warnings enabled? At least GCC gives me warnings about unknown escape sequences..
If you write down your path like "C:\Foobar", the compiler tries to escape "\F", which is not a valid escape sequence and afair (not sure what the standard says) it will be dropped from the string. To actually get a "\", you write "\\".
Using relative paths however is much better, and using "/" as path delimiter also (it works on Windows, Linux and OSX).