Re: CString and Insertion Operator ( << )
The last time I used MFC, I basically used std::string/wstring throughout and made use of the c_str() function and the CString constructor to pass the string when it was needed.
Otherwise, you can do it by writing the appropriate operator:
Code:
CString& operator<<(CString&, const CryptoPP::Integer&);
By returning the input CString as the function value, you will be able to chain them together. Of course, that means that you'll probably also want to implement other overloads, like operator<<(CString&, const char*) and so on.
Correct is better than fast. Simple is better than complex. Clear is better than cute. Safe is better than insecure.
-- Sutter and Alexandrescu, C++ Coding Standards
Programs must be written for people to read, and only incidentally for machines to execute.
-- Harold Abelson and Gerald Jay Sussman
The cheapest, fastest and most reliable components of a computer system are those that aren't there.
-- Gordon Bell