If you can build and run your cpp-file as single file, your default compiler is okay.
If it does not work from inside the project, your projects compiler settings are wrong.
Check wherther you have chosen the correct compiler (for the project and the build targets) in "Project -> Build options".