+ 1
wrong question from the game sololearn
I can’t insert a screenshot, but in the c ++ test competitive game there is a question: "Struct can have classes inside of it?" and 2 answers: true or false. In this question, the final answer is false I didn’t understand something or is this a wrong question !? A list structure, for example, may have a class inside of itself
7 Respuestas
+ 2
But a class encapsulates its members already, isn't it?
Then the class in structure shouldn't be instantiable or used by code outside the structure? is this what it meant for?
+ 2
Thank you ~ swim ~
I'll be reading that 👍
+ 2
No problem ~ swim ~ ,
A read is better than a "compressed" version written in limited space like answer for a thread.
Sorry to bother, I didn't know 😁
+ 1
~ swim ~
What are the use cases of this structure with class definition?
+ 1
Yes, it's a wrong question.
Apologies for misleading...
I submitted that question.
+ 1
I also came across this question a week ago, and wrote a complaint that the answer was incorrect, but the answer has still not been fixed. I wonder, if someone is considering complaints.
- 3
Shirin