I guess you are struggeling on characters sets. By default VC2005 uses unicode. So you should use wcout.
What you see is the address of name. You can call the operator which returns the address of the character array: (LPCTSTR)name.
You can also add an operator for ostream and wostream:
std::wostream& operator<<(std::wostream& wostr, const CString& s) { wostr << (LPCTSTR)s; return wostr; }
Do the same for ostream if you do multi byte char set builds.
-- SvenC
|