I'm trying to make a CString class that can work in Linux, but I'm running into a problem with the Format function.
In MFC you can pass a CString object to the Format function without using the "&" sign.
CString Name = "Tom";
data.Format("My name is %s",Name);
That works in MFC (VC++), but it does not work in the GNU compiler. The GNU compiler requires that I use the LPCTSTR operator.
data.Format("My name is %s",(LPCTSTR)Name);
data.Format("My name is %s",Name.operator LPCTSTR());
Is there any way I can get the Format function to be able to accept the syntax in the original code?