  | | | C++ question | C++ question 2004-06-10 - By François Painchaud
Back CString stores wide characters. Use CString method "const wchar_t* GetWideString() const", then use "FILE* _wfopen( const wchar_t* filename, const wchar_t* mode )" or a similar open function. You could also take a look at function "int wctomb( char* mbchar, wchar_t wchar )".
François -- ----- Message d'origine -- ----- Sujet: C++ question Date: Thu, 10 Jun 2004 15:58:11 +0200 De: "Helge Mathee" <helge.mathee@(protected)> A: <XSI@(protected)>
Maybe I am dumb..... how to convert a CString to a const char *? I need this to read files inside of a c++ operator... really weird... just doesn't work... thanks, helge
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> </head> <body bgcolor="#ffffff"> CString stores wide characters. Use CString method "const wchar_t* GetWideString() const", then use "FILE* _wfopen( const wchar_t* filename, const wchar_t* mode )" or a similar open function. You could also take a look at function "int wctomb( char* mbchar, wchar_t wchar )".<br> <br> François<br> <br> -- ----- Message d'origine -- ----- <table cellpadding="0" cellspacing="0" border="0"> <tbody> <tr> <th valign="baseline" align="right" nowrap="nowrap">Sujet: </th> <td>C++ question</td> </tr> <tr> <th valign="baseline" align="right" nowrap="nowrap">Date: </th> <td>Thu, 10 Jun 2004 15:58:11 +0200</td> </tr> <tr> <th valign="baseline" align="right" nowrap="nowrap">De: </th> <td>"Helge Mathee" <a class="moz-txt-link-rfc2396E" href="mailto:helge .mathee@(protected)"><helge.mathee@(protected)></a></td> </tr> <tr> <th valign="baseline" align="right" nowrap="nowrap">A: </th> <td><a class="moz-txt-link-rfc2396E" href="mailto:XSI@(protected)">< ;XSI@(protected)></a></td> </tr> </tbody> </table> <br> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1"> <meta content="MSHTML 6.00.2737.800" name="GENERATOR"> <style></style> <div><font face="Arial" size="2">Maybe I am dumb.....</font></div> <div><font face="Arial" size="2"></font> </div> <div><font face="Arial" size="2">how to convert a CString to a const char *?</font></div> <div><font face="Arial" size="2"></font> </div> <div><font face="Arial" size="2">I need this to read files inside of a c++ operator...</font></div> <div><font face="Arial" size="2"></font> </div> <div><font face="Arial" size="2">really weird... just doesn't work...</font>< /div> <div><font face="Arial" size="2"></font> </div> <div><font face="Arial" size="2">thanks,</font></div> <div><font face="Arial" size="2"></font> </div> <div><font face="Arial" size="2">helge</font></div> </body> </html>
|
|
 |