Bonjour,
je galère depuis quelques jours sur un bout de code.
Pour être bref voici le code qui marche ne marche pas:
Code C/C++ :
void maFonction(const std::string &utf8text, EChatType type, BOOL animate)
{
string chaine=utf8text;
string str = "http://localhost/test2/textToMlif.php?sentence="+chaine;
using namespace std;
char* testStr = (char*)str.c_str();
CURL *session = curl_easy_init();
[code=cpp][code=cpp][code=cpp]
[/code][/code]curl_easy_setopt(session, CURLOPT_URL, testStr);[/code]
Ceci est sensé passer par GET utf8text, mais il ne renvoi rien du tout.
En revanche, si je fait :
Code C/C++ :
void maFonction(const std::string &utf8text, EChatType type, BOOL animate)
{
string chaine="ma chaine de caracteres";
string str = "http://localhost/test2/textToMlif.php?sentence="+chaine;
using namespace std;
char* testStr = (char*)str.c_str();
CURL *session = curl_easy_init();
[code=cpp][code=cpp][code=cpp]
[/code][/code]curl_easy_setopt(session, CURLOPT_URL, testStr);[/code]
cela marche...
Il y a probablement quelque chose que je n'ai pas saisie au niveau des références en c++.
Quelqu'un sait d'où peut venir le problème ?
merci