An expression attempted to return a value from a constructor or a void function. Constructor functions automatically return a pointer to the constructed function; they do not return a value. Functions that are defined with the void return type cannot return a value.
To correct this error
-
Remove the return statement.
-
Specify a non-void return type for the function.
See Also
Reference
function Statementreturn Statement