Can I add CChartObjectFibo to CList as element?

 

CChartObjectFibo is CObject's son,  Can I add CChartObjectFibo to CList as element?

This code is error, pls help me.

 

CList *FibList =new CList; 

CChartObjectFibo fibobject;

        if(!fibobject.Attach(ChartID(),ObjectName(0,i),0,2))
           {
            printf("FibObject attach error");
            return;
           }
          FibList.Add(fibobject);  <----'fibobject' - parameter conversion is not allowed       
 
codeidea posted  :

CChartObjectFibo is CObject's son,  Can I add CChartObjectFibo to CList as element?

This code is error, pls help me.

 

The declaration of fibobject should be as a pointer

CChartObjectFibo *fibobject = new CChartObjectFibo;

Paul

http://paulsfxrandomwalk.blogspot.com/ 

Regularly emailing the status of an account
  • 2012.06.14
  • Paul
  • paulsfxrandomwalk.blogspot.com
Prompted by a query, I thought I'd post a useful little utility that I have used for ages which emails the status of the account every hour.  After lengthy deliberation I decided to call it .... EmailStatus.  With only a small modification it could be used to log the status to a file, and the time...
 

thanks, phampton. I sloved it.