1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
wxFileName fname(chemin_fichier); //Pour pouvoir récupérer nom du fichier + extension
wxString nom_fichier = fname.GetFullName();
//Ici je peux afficher le nom+extension sans aucun problème
size_t t_tempo = nom_fichier.Len(); // Taille chaine nom_fichier
// Controle dela taille retournée = nb caractères = OK
// Ces 3 lignes sont là juste pour tester
char test[34];
sprintf(test,"%s",nom_fichier.c_str());
wxMessageBox(wxT(test),"chemin depuis tableau",wxOK); // Ici j'affiche bien le nom du fichier sans problème
char trame_init[(int)t_tempo+34]; // Tableau pour recevoir les données avant insertion dans le tableau (+34 inclu 13 caractères pour chaque long long int et les spérateurs (|) )
sprintf(&trame_init[4],"%lli|%lli|%i|%s",this->taille_fichier,this->start,demande_retour,nom_fichier.c_str()); // Insertion dans tableau temporaire
wxMessageBox(wxT(&trame_init[4]),"tableau envoi",wxOK);
// Ici en affichant la trame "composée" la dernière partie qui devrait correspondre à ma chaine (nom du fichier) est remplacée par (null). Et ce problème ne se produit que sous XP! |
Partager