Bonjour à tous !

Dans le cadre de mon projet de gestion de tournoi, j'ai créer via Qt une fenêtre visant à éditer les participants ajoutés au préalable (c'est à dire modifier nom, prénom, pseudo, team..)
Pour le nom tout fonctionne bien mais lorsque je veux éditer le prénom ou pseudo, une erreur
"Linstruction à 0x77c17b19 emploie la mémoire 0x00000000, la mémoire ne peut pas être "written"
Je ne sais pas d'où celà provient, voici le code s'il peut vous être utile :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
 
void eparticipants::sltEdit()
{
    Participant *e;
    e = new Participant;
    QString qspart = ui->LineEP->text();
    char * argnom;
    char * argprenom;
    char * argpseudo;
    char * argnomteam;
    QString qsnom = ui->LineENom->text();
    QString qsprenom =ui->LineEPrenom->text();
    QString qspseudo = ui->LineEPseudo->text();
    QString qsteam = ui->LineETeam->text();
 
    if(ui->LineENom->text().isEmpty())
        argnom = e->getNom();
    if(ui->LineEPrenom->text().isEmpty())
        argprenom = e->getPrenom();
    if(ui->LineEPseudo->text().isEmpty())
        argpseudo = e->getPseudo();
    if(ui->LineETeam->text().isEmpty())
        argnomteam = e->getNomTeam();
    ifstream FILE_1("participants",ios::binary|ios::in);
    ofstream FILE_2("P2",ios::binary|ios::out);
    FILE_1.read((char *)e, sizeof(Participant));
    while (e->getPrenom()!=qspart && e->getPseudo() != qspart && e->getNom() != qspart && !(FILE_1.eof()))
       {
         FILE_2.write((char *)e, sizeof(Participant));
         FILE_1.read((char *)e, sizeof(Participant));
       }
    FILE_1.read((char *)e, sizeof(Participant));
    while (!FILE_1.eof())
          {
                FILE_2.write((char *)e, sizeof(Participant));
                FILE_1.read((char *)e, sizeof(Participant));
          }
    FILE_2.close();
    FILE_1.close();
 
    ifstream FILE_3("P2",ios::binary|ios::in);
    ofstream FILE_4("participants",ios::binary|ios::out);
     FILE_3.read((char *)e, sizeof(Participant));
        while(!FILE_3.eof())
        {
             FILE_4.write((char *)e, sizeof(Participant));
             FILE_3.read((char *)e, sizeof(Participant));
        }
        FILE_3.close();
        FILE_4.close();
 
        if(!(qsnom.isEmpty()))
        {
            strncpy (argnom, qsnom.toUtf8().data(),qsnom.length());
            argnom[qsnom.length()]='\0';
        }
        if(!(qsprenom.isEmpty()))
        {
            strncpy (argprenom, qsprenom.toUtf8().data(),qsprenom.length());
            argprenom[qsprenom.length()]='\0';
        }
        if(!(qspseudo.isEmpty()))
        {
            strncpy (argpseudo, qspseudo.toUtf8().data(),qspseudo.length());
            argpseudo[qspseudo.length()]='\0';
        }
        if(!(qsteam.isEmpty()))
        {
            strncpy (argnomteam, qsteam.toUtf8().data(),qsteam.length());
            argnomteam[qsteam.length()]='\0';
        }
        Participant *a;
       a = new Participant;
    ofstream FILE_ECRI("participants",ios::binary|ios::app);
    if(!a->enregParticipant(argnom, argprenom, argpseudo, argnomteam))
          QMessageBox::critical(this, "Edition", "Erreur de modification du participant");
     if(FILE_ECRI.write((char *)a, sizeof(Participant)))
        QMessageBox::information(this,"Edition","participant modifié avec succès!");
     FILE_ECRI.close();
     remove("P2");
     QDialog::hide() ;
}
Voila en espérant que vous pourrez me débloquer je vous remercie à l'avance !