A. In mycalculatordlg. H, add the definition Declaration for the functions calculate () and updatedisplay:
Afx_msg void calculate ();
Afxmsg void updatedisplay (double lval );
Added successfully as follows:
// {Afx_msg (cmycalculatordlg)
Virtual bool oninitdialog ();
Afx_msg void onsyscommand (uint NID, lparam );
Afx_msg void onpaint ();
Afx_msg hcursor onquerydragicon ();
Afx_msg void onbutton0 ();
Afx_msg void onbutton1 ();
Afx_msg void onbutton2 ();
Afx_msg void onbutton3 ();
Afx_msg void onbutton4 ();
Afx_msg void onbutton5 ();
Afx_msg void onbutton6 ();
Afx_msg void onbutton7 ();
Afx_msg void onbutton8 ();
Afx_msg void onbutton9 ();
Afx_msg void onbuttonadd ();
Afx_msg void onbuttonclear ();
Afx_msg void onbuttondiv ();
Afx_msg void onbuttonequal ();
Afx_msg void onbuttonminus ();
Afx_msg void onbuttonmutiply ();
Afx_msg void onbuttonreciprocal ();
Afx_msg void onbuttonpoint ();
Afx_msg void onbuttonsign ();
Afx_msg void onbuttonsqrt ();
Afx_msg void calculate ();
Afx_msg void updatedisplay (double lval );
//} Afx_msg
B. Error c2065: 'fabs ': Undeclared identifier
Error c2065: 'sqrt ': Undeclared identifier
Add the header file in mycalculator. cpp:
# Include "math. H"