My code won't run

I'm reading Learning C++ and I got some codes from there to try out, but they won't work on the Visual Studio 2015 platform. Is this code right? What am I doing wrong? Please help out.

#include <iostream>
using namespace std;

main int()
{
cout << "Programming is great fun!"'
return 0
}
1
2
3
4
5
6
7
8
9
10
11
12
#include <iostream>
using namespace std;

// main int()
int main()
{
    // cout << "Programming is great fun!"'
    cout << "Programming is great fun!"; // semicolon

    // return 0 
    return 0; // semicolon
}
No. It is not right.

Statements should be terminated with semicolon.
This line is wrong: main int()
Try to explain what it does.
Topic archived. No new replies allowed.