How do I decide whether to use ATL, MFC, Win32 or CLR for a new C++ project?

It depends on your needs. Using the CLR will provide you with the most expressive set of libraries (the entire .NET framework), at the cost of restricting your executable to requiring the .NET framework to be installed at runtime, as well as limiting you to the Windows platform (however, all 4 listed technologies are windows … Read more

How do you convert CString and std::string std::wstring to each other?

According to CodeGuru: CString to std::string: CString cs(“Hello”); std::string s((LPCTSTR)cs); BUT: std::string cannot always construct from a LPCTSTR. i.e. the code will fail for UNICODE builds. As std::string can construct only from LPSTR / LPCSTR, a programmer who uses VC++ 7.x or better can utilize conversion classes such as CT2CA as an intermediary. CString cs … Read more

LPCSTR, LPCTSTR and LPTSTR

To answer the first part of your question: LPCSTR is a pointer to a const string (LP means Long Pointer) LPCTSTR is a pointer to a const TCHAR string, (TCHAR being either a wide char or char depending on whether UNICODE is defined in your project) LPTSTR is a pointer to a (non-const) TCHAR string … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)