I’m using return EXIT_SUCCESS to exit a void function. However I get a flag that says my method should not return a value.
The code works fine, but is there a better way to exit a method by using a return or something else?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Redefine the method as
Then you can return EXIT_SUCCESS.
Is any code calling this method and expecting a value?