[Dev-C++] Converting char* to wxString
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Luis B. <lf...@ya...> - 2007-08-09 17:03:34
|
Can someone help me?=0A=0AI'm trying to convert a char* to a wxString:=0A=
=0Avoid wxOpengl3D::ReadFile(wxString & file)=0A{=0A=0A char * temp=3Dne=
w char[file.Len()+1];=0A CTextFile cfile;=0A wxString centerx;=0A=0A =
// Open file=0A cfile.InitializeWith((char *)file.mb_str( wxConvUTF8 =
));=0A cfile.OpenFileToRead();=0A=0A // Get a string from file ending=
in ';'=0A temp=3Dstrupr(cfile.get_str(temp,';'));=0A centerx=3Dtemp;=
=0A (...)=0A}=0A=0AI get this error:=0A=0Aerror: ambiguous overload for =
'operator=3D' in '((wxOpengl3D*)this)->wxOpengl3D::centerx =3D temp'=0AC:/w=
xWidgets-2.8.4/include/wx/string.h:676: note: candidates are: wxString& wxS=
tring::operator=3D(int) <near match>=0AC:/wxWidgets-2.8.4/include/wx/string=
.h:957: note: wxString& wxString::operator=3D(wxChar) <near=
match>=0AC:/wxWidgets-2.8.4/include/wx/string.h:971: note: =
wxString& wxString::operator=3D(const wxWCharBuffer&) <near match>=0AC:/wx=
Widgets-2.8.4/include/wx/string.h:1026: note: wxString& wxS=
tring::operator=3D(const wxString&) <near match>=0A=0AWhen using wxWidgets-=
2.6 no error were found.=0A=0AThanks in advance.=0A=0A=0A=0A=0A=0A =
=0A________________________________________________________________________=
____________=0ABe a better Heartthrob. Get better relationship answers from=
someone who knows. Yahoo! Answers - Check it out. =0Ahttp://answers.yahoo.=
com/dir/?link=3Dlist&sid=3D396545433 |