PB convertion : String => Const char*
Résolu/Fermé
Sygfried
Messages postés
6
Date d'inscription
jeudi 22 février 2007
Statut
Membre
Dernière intervention
11 mai 2007
-
30 mars 2007 à 10:02
Sygfried Messages postés 6 Date d'inscription jeudi 22 février 2007 Statut Membre Dernière intervention 11 mai 2007 - 30 mars 2007 à 10:29
Sygfried Messages postés 6 Date d'inscription jeudi 22 février 2007 Statut Membre Dernière intervention 11 mai 2007 - 30 mars 2007 à 10:29
A voir également:
- PB convertion : String => Const char*
- Cannot access offset of type string on string - Forum PHP
- Char ** - Forum C
- Vba convertir string en integer - Forum VB / VBA
- Uninitialized string offset ✓ - Forum PHP
- Char java - Astuces et Solutions
2 réponses
Sygfried
Messages postés
6
Date d'inscription
jeudi 22 février 2007
Statut
Membre
Dernière intervention
11 mai 2007
1
30 mars 2007 à 10:29
30 mars 2007 à 10:29
Bon evidemment , jecherche comme une tanche pendant une journée sans rien trouver et sufit que je post pour trouver la solution :
Il faut pour cela passer l'adresse du string et préciser a partir d'ou:
exemple avec le TiXml de tt a l'heure:
Fichier.h:
#ifndef SOUDURE
#define SOUDURE
#include <string>
class soudure
{
public:
struct var
{
string essai;
};
void GetData();
};
struct var a;
#endif
msg->LinkEndChild( new TiXmlText ( &a.essai[0] );
Il faut pour cela passer l'adresse du string et préciser a partir d'ou:
exemple avec le TiXml de tt a l'heure:
Fichier.h:
#ifndef SOUDURE
#define SOUDURE
#include <string>
class soudure
{
public:
struct var
{
string essai;
};
void GetData();
};
struct var a;
#endif
msg->LinkEndChild( new TiXmlText ( &a.essai[0] );