|
-
June 6th, 2009, 12:57 AM
#1
[RESOLVED] regarding new and delete error
can u please help me debugging this
Code:
CCapacitor *c=new CCapacitor(x1,y1,capbus,capsize,capval,capname,caporien);
errors displayed is:
error C2248: 'new' : cannot access public member declared in class 'CObject'
f:\microsoft visual studio\vc98\mfc\include\afx.h(683) : see declaration of 'new'
error C2248: 'delete' : cannot access public member declared in class 'CObject'
f:\microsoft visual studio\vc98\mfc\include\afx.h(685) : see declaration of 'delete'
my declaration of CCapacitor class is:
Code:
class CCapacitor:CObject
{
protected:
DECLARE_SERIAL(CCapacitor)
public:
long m_x1;
long m_y1;
long m_capbus;
long m_capsize;
double m_capval;
CString m_capname;
long m_caporien;
public:
CCapacitor()
{
}
CCapacitor(long x1,long y1,long capbus,long capsize,double capval,CString capname,long caporien)
{
m_x1=x1;
m_y1=y1;
m_capbus=capbus;
m_capsize=capsize;
m_capval=capval;
m_capname=capname;
m_caporien=caporien;
}
void Draw_Capacitor(CDC *pDC);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCapacitor)
public:
virtual void Serialize(CArchive& ar); // overridden for document i/o
//}}AFX_VIRTUAL
};
-
June 6th, 2009, 01:30 AM
#2
Re: regarding new and delete error
i gotit solved no need to repl ne mor..............
-
June 6th, 2009, 08:38 AM
#3
Re: regarding new and delete error
"class CCapacitor: public CObject"
-
June 10th, 2009, 05:24 AM
#4
Re: regarding new and delete error
yeah you got that write.......
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|