I suggest you first learn to write syntactically correct C++ code before asking questions about semantics.
Oh, and FYI - the output you're getting is from the compiler, complaining about your bad syntax, not from your program! This is not VB or any other interpreted language, you first have to get it syntactically right before you can try to run it. See
http://www.differencebetween.com/difference-between-compiler-and-vs-interpreter/[
^]