[Solved] Error by Compiler gcc: undefined reference to `main’


It would be more readable if you kept the code formatting for the whole code, not just its part.

But when I tried to find a main function, I didn’t find any. Therefore there is no reference to main because you haven’t implemented one, at least not in the code you posted here.

solved Error by Compiler gcc: undefined reference to `main’