Hi,
Im currently making a calculator in c++.net 2003.
I've got it to 'square' numbers and produce a result. Heres the code:-
void CAssignmentDlg::OnBnClickedButton21()
{
m_fSquare=m_fSquare+atof(m_sDisplay);
m_sDisplay="";
m_fSquareRes = m_fSquare * m_fSquare;
char strSquare[20];
m_fmem=m_fSquareRes;
gcvt(m_fmem,6,strSquare);
for (int i = 0;i<20;i++)
m_sDisplay = m_sDisplay+strSquare[i];
UpdateData(FALSE);
}
My problem is how to make another button produce the square rrot of a number, it is essentially the inverse of this code but i really dont know how to do it!
Could someone give me a hand?
Thanks
Ash:D
My new web design domain
www.askmultimedia.co.uk