• Register
100 points
7 4

In C++ when you get wreturn –type error is a warning that shows peculiar conditions in your coding process. The error warning might appear but still the program may run as expected.  File name or line number may cause the warning messages. The error is like return no value warning message that happens when a program code is run but the value returned is null. The best way to determine the solution is to investigate if there is any value to be returned or if the function doesn’t have a return value.

Reasons


The two reasons return is non- void:
    1. When a function was executed without including return value or statement.
    2. When the function does not have a defined return statement, and the programmer did not specify return 0 so that a null value can be the output.  

Solutions


The solution is to input return 0 in main () and the function will output 0.
 

Sample solutions

Let the main integer be void which means the function returns nothing after executing, add return 0 to make sure it works.

Int main (void)
Put (strA)
Return 0


The function will work. 
 

Hope this helps.

100 points
7 4