error: return-statement with a value, in function returning 'void' [-fpermissive]

error: return-statement with a value, in function returning 'void' [-fpermissive]What does this mean in reference to the code?

1
2
3
4
5
6
7
  void exit_program (void)
{
    cout << "Thank you and have a nice day.";

    return EXIT_SUCCESS;
}
void means dont return anything .
yet you return EXIT_SUCCESS

1
2
3
4
5
6
  void exit_program (void)
{
    cout << "Thank you and have a nice day.";

    return ;  //Still means return nothing. Or beter still leave it empty
}
Topic archived. No new replies allowed.