Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8916901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:21:59+00:00 2026-06-15T05:21:59+00:00

I found this exercise about C++ in a list and just couldn’t solve it.

  • 0

I found this exercise about C++ in a list and just couldn’t solve it. Here it is:
Let’s say we have the following instruction:

ObjA = ObjB; 

In which ObjA is an object of ClassA, and ObjB is an object of ClassB, this will run properly, if and only if there is:
A. A conversion function in ClassA
B. A conversion function in ClassB
C. A constructor in ClassA
D. A constructor in ClassB

There can be multiple correct answers.
My problem with this exercise is that they are both objects, and, theoretically, you can’t change the instance inside an object – and that is what I think the ‘=’ would do there. Since there can be multiple correct answers, I thought, therefore, that none were correct. But I’m not sure.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T05:22:01+00:00Added an answer on June 15, 2026 at 5:22 am

    This will run correctly if any of these is true:

    1. There is an assignment operator in ClassA which takes an argument of type ClassB
    2. There is an assignment operator in ClassA which takes an argument of type X and there is conversion function to type X in ClassB.
    3. There is a conversion function to type ClassA in ClassB.

    I don’t know how/if these match to the ABCD choice(s) you have.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking few exercise from university about C++ and I found out this exercise:
I have found this question in the one site which was about counting sort
I have a question about this script I found and used. It works but
I am working on an exercise based on this image. I have found the
I have a few questions about this function from John Resig's exercise #19 in
Found this while reading the Neo4j manual, specifically here , I found the sentence:
I am studying the SCJP, and while studying I have found an exercise that
I have just learned about recursion in Python and have completed assignments, one of
I was reading about sockets and found a nice exercise to try: a simple
I'm studying for a Discrete Mathematics test and I found this exercise which I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.