New course! Every coder should learn Generative AI!
Try a free lesson0
Can a C++ class have an object of self type?
2 Answers
+ 5
no
+ 3
No, not an object; but it can have a pointer to an object of its own type.
That's in fact how linked lists work.