Re: [Dev-C++] Converting char* to wxString
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: matheus r. <mfr...@gm...> - 2007-08-09 17:22:19
|
Change function declaration to:
void wxOpengl3D::ReadFile(const wxString & file)
maybe it helps compiler find the exact match.
2007/8/9, Luis Bras <lf...@ya...>:
>
> Can someone help me?
>
> I'm trying to convert a char* to a wxString:
>
> void wxOpengl3D::ReadFile(wxString & file)
> {
>
> char * temp=new char[file.Len()+1];
> CTextFile cfile;
> wxString centerx;
>
> // Open file
> cfile.InitializeWith((char *)file.mb_str( wxConvUTF8 ));
> cfile.OpenFileToRead();
>
> // Get a string from file ending in ';'
> temp=strupr(cfile.get_str(temp,';'));
> centerx=temp;
> (...)
> }
>
> I get this error:
>
> error: ambiguous overload for 'operator=' in
> '((wxOpengl3D*)this)->wxOpengl3D::centerx = temp'
> C:/wxWidgets-2.8.4/include/wx/string.h:676: note: candidates are: wxString&
> wxString::operator=(int) <near match>
> C:/wxWidgets-2.8.4/include/wx/string.h:957: note: wxString&
> wxString::operator=(wxChar) <near match>
> C:/wxWidgets-2.8.4/include/wx/string.h:971: note: wxString&
> wxString::operator=(const wxWCharBuffer&) <near match>
> C:/wxWidgets-2.8.4/include/wx/string.h:1026: note: wxString&
> wxString::operator=(const wxString&) <near match>
>
> When using wxWidgets-2.6 no error were found.
>
> Thanks in advance.
>
>
>
> ________________________________
> Got a little couch potato?
> Check out fun summer activities for kids.
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE:
> http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
|