Look at CStdioFile and CString::Tokenize().

Beyond that, without a lot more details from you, I doubt anybody can help much. What part are you stuck on?