You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Line 9 is an error, redefining a name that had been used as a type earlier outside the class scope -- note that some compilers will not flag this as an error.
In lines 10, 11, and 16, then, Type will be std::string.
Line 18, then, has a type-mismatch error, since parm is a std::string (no conversion from std::string to int.)
Line 19, then, returns the wrong type.
To correct the errors, use a different name than Type for the in-class type definition of double, and adjust the name in lines 10, 11, and 16. Adjusting all three will fix the errors in lines 18 and 19 without further changes.
The text was updated successfully, but these errors were encountered:
Line 9 is an error, redefining a name that had been used as a type earlier outside the class scope -- note that some compilers will not flag this as an error.
In lines 10, 11, and 16, then, Type will be std::string.
Line 18, then, has a type-mismatch error, since parm is a std::string (no conversion from std::string to int.)
Line 19, then, returns the wrong type.
To correct the errors, use a different name than Type for the in-class type definition of double, and adjust the name in lines 10, 11, and 16. Adjusting all three will fix the errors in lines 18 and 19 without further changes.
The text was updated successfully, but these errors were encountered: