Hi all,
I have class CTestView and CChartDlg , I want to use an array of CTestView in the other class, here is the code:
the other class:Code:class CTestView : public CView { ........................... public: int num[10] void fun(); ................................... }; ......................... void CTestView::fun() { ................ for (int i=0;i<10;i++) num[i]=i; ......... }
I want to use num[0]~num[9] in class CChartDlgCode:class CChartDlg : public CDialog { public: CChartDlg(CWnd* pParent = NULL); ....................... protected: afx_msg void OnCreate(); ......................... } ............................... void CChartDlg::OnCreate() { ............... // I want to use num[0]~num[9] in this function. }
I tried CCentriodView getv;
but getv.num[0] is not the right num ,can anyone help me with this?Thank you !




Reply With Quote
