Hi Anitha, You can use this code: void CSplit::Split(CString str, CString separator, CStringArray& array) { CString aux; int pos; pos = 0; array.RemoveAll(); for (int i=0; i<str.getlength();> { if (str[i]==separator) { aux = str.Mid(pos,(i-pos)); pos = i+1; array.Add(aux); } } aux = str.Mid(pos,str.GetLength()-pos); array.Add(aux); } Regards, Gustavo