use atoi(CString ) to convert a CString object to an integer....
Thanks lot,
Srini