class time24;
class time12
{
operator time24()
{
...
return time24(temp) // error
}
}
class time24
{
...
};
error C2440: ” : cannot convert from ‘int’ to ‘time24’
how else can i return the object to overcome this error
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.
You move the implementation after the class definitions, in an implementation file:
I’m assuming you meant to implement
operator time24().