Error when trying to compile "undefined reference to main"

I’m actually trying to do the block letters project, but this error occurs when I try to do anything now, hello world included.

$ g++ initials.cpp
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status

I found a post that said it may be an issue with the website. I gave it about 18 hours and it’s still happening. Is there anything I can do?

What does your initials.cpp look like?? Undefined reference to main could mean that you haven’t defined one of the functions in your class or something of that nature.

#include <iostream>

int main() {
  std::cout << "texthere\n";

I’ve written this code many times now and it’s always worked until now. I even copied and pasted from the sample solution and it came up with the same error.

any solution yet
i have also stuck

Make sure to save your file if you have a main and it doesn’t run.