VS Error: RC1004 unexpected end of file found [How to Fix]

As shown in the figure, an error occurs when compiling the code: RC1004   unexpected end of file found

The reason is that CPP needs one more line at last, otherwise it will report this error

Examples of errors:

int main()
{
    return 0;  
}

Correct example

int main()
{
    return 0;
}  
// Leave a line at the end so it doesn't report an error 

Similar Posts: