![]() |
[C++] UnicodeString <-> const char *
Hi Leute,
ich hab mit C++ keine Erfahrung, aber folgendes Problem. Ich habe einen Konstruktor der folgende Überladungen hat:
Code:
Und nun will ich den aufrufen:
TiXmlDocument( const char * documentName );
TiXmlDocument( const std::string& documentName );
Code:
Aber ich bekomme die Fehlermeldung:
void __fastcall openXMLFile(String fileName)
{ TiXmlDocument doc(fileName); doc.LoadFile(); ... Zitat:
|
Re: [C++] UnicodeString <-> const char *
Hallo,
du versuchst der überladenen Funktion einen Typen zu übergeben, den diese nicht kennt. Und zwar passiert der Fehler wahrscheinlich hier void __fastcall openXMLFile(String fileName) Ich glaube, dass String nicht im Namespace std ist. Versuche dort ebenfalls std::string Ich hoffe, ich irre mich nicht. Ist alles schon so lange her :) lg Wannebee |
Re: [C++] UnicodeString <-> const char *
Ich habe das drin:
Code:
und die Funktion hat nun diesen Kopf:
using namespace std;
Code:
Nun kracht es breits beim Aufruf:
void __fastcall openXMLFile(string fileName)
Code:
openXMLFile(Path_Edt->Text);
Zitat:
Code:
openXMLFile(Path_Edt->Text.c_str());
Zitat:
|
Re: [C++] UnicodeString <-> const char *
![]() ? Geht das? Was man nicht alles findet^^ Da wirst du doch eher antwort bekommen als hier im Delphi-Forum :) lg Wannebee |
Re: [C++] UnicodeString <-> const char *
Ja, done. :)
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:28 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz