Because your code is wrong...
Seriouly, it's C-- what you type, without getting offensive. Please don't start by using SFML when you're absolutely new to C++ programming -- and I guess you are, regarding to your code you posted here.
You didn't even read the tutorials, did you? There're tons of simple examples of how you open windows correctly..