You may have to turn on RTTI in the project settings if it is Visual Studio? It didn't used to be on by default but I don't know if it produces an error if it is not turned on.
Other possibility is the console window disappeared before any text was printed... use cout.flush()? EDIT: Probably not that since endl does a flush.
Why don't you step through looking at the variables in the debugger?