If that is your entire code, then no, it won't build: you are missing the
lines, and a function definition for that code to run in: the minimum C++ program is pretty much this:
using namespace std;
And even if you gave us the complete error messages that the compiler generates when you try to build the app, it wouldn't help much without that actual framework in place.
So it's going to be up to you.
Start by looking at the compiler error messages: they will be of the form
Filename.cpp:Line number:Column number: Message
main.cpp:17:5: error: expected ‘;’ before ‘return’
That is saying that "main.cpp" has a problem on line 17, column 5: there is a missing semicolon before the line of code starts.
So use your editor to go to the appropriate line and look at the code and what is immediately above it.
Do that with your error messages and most of them should be pretty obvious: if they aren't then ask again but this time show us the relevant fragments, complete with the error message, and indicate what line the error is showing up on.
We can't fix compilation problems with code we can't compile!