ridiculous error messages that shouldn't be happening

Here's my code:
1
2
3
4
5
6
7
#include <iostream>
using namespace std;

int main(void); {
	cout << "I like printing this line\n";
	return 0;
}


very simple. It's so simple that I can't imagine anything possibly going wrong.
But, oh no. at "int main(void); {", I am told that I have a syntax error, that "Void" was not declared in this scope, that there was an expected unqualified-id before the '{' token, and that I had an unused declaration of function main.

I don't understand what I am doing wrong. Can someone who does please help me?
you're not supposed to have a semicolon in front of the calling main function
you also don't need the void between the ()

Last edited on
Topic archived. No new replies allowed.