Although DarkRoku's suggestion of escaping the back-slash (doubling it) would technically fix the problem, it's much more portable - and a lot clearer - to just replace the back-slashes (\) with regular slashes (/). That way, it doesn't need escaping, doesn't need to be doubled and the code will work on a lot more systems.
tldr;
t.loadFromFile("D:\VS\TEST\ConsoleApplication1\Debug\1.png");
becomes
t.loadFromFile("D:/VS/TEST/ConsoleApplication1/Debug/1.png");
Note, though, that loadFromFile() returns a boolean that you should test. If it returns false, it failed to load the file.