i've been wasting hours going round in circles. Frustrating that first steps of learning are this hard.][4]
i;ve removed the semi-colon and moved the curly hash together and separetely to no avail.
i've been wasting hours going round in circles. Frustrating that first steps of learning are this hard.][4]
i;ve removed the semi-colon and moved the curly hash together and separetely to no avail.
It's simple. There's no semicolon at the end of the line. Each line of code is expected to end with a semicolon.
If there's something more complex going on, it would require seeing the surrounding code to see what is causing the problem.
[EDIT: new screenshot]
This is a very, very common mistake for new programmers, so don't feel bad.
Simple fix: remove the semicolon from the following line:
int main(void)
A semicolon should only be added to the end of a signature line when the full function code appears later. (You'll learn about this later.) The main declaration behaves just like a signature line for a function, but should never be written with a semicolon.
With errors like this, the compiler gets confused because it thinks the line is a function signature, so it keeps going until it sees something that looks wrong, given that the signature line was right. (Or the developers of C think this error is so basic that it doesn't warrant code in the compiler to catch this as an error.)
If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)