Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

CList Errors & Copy Constructor problems

kvillineskvillines Posts: 35Member
Question 1:
I have never used CList but I need to copy some objects into one for storage. I thought I could write a class that inherits from CList but that is not working. I am doing the following and keep getting errors.

[code]
#include "Shape.h"

class CShapelist : public CList
{
public:
CShapelist();
virtual ~CShapelist();

};
[/code]

I am doing something wrong and have exhausted the books that I have. There isn't alot of samples or indepth info on CList.

Question 2:
My CShape copy constructor is compiling but I need to know if I need implementation since it is all in my class? And if it does nothing is the default to copy the whole object?

[code]
class CShape : public CWnd
{
// Construction
public:
CShape(int m_nColor = 0, int m_lineColor = 2,
int m_lineSize = 12);
CShape( const CShape& a ) {} // Copy constructor
[/code]


Thanks
-Ken
Sign In or Register to comment.