Looks like you are using C++/CLI. Are you sure you created the right type of project?
I tried to create a console C++/CLI project and typed this, which worked:
Notice the case sensitivity and the ^ character for managed datatypes.
If you dont know what these are I reccommend you look at Ivor Horton's Beginning Visual C++.
In any case the example I put up above is not "standard C++".