IniFile mettre une section à l'interieur d'une autre section
salut
je crois que tout est dans l'intitulé,j'aimerai pouvoir lire la valeur d'une section qui se trouve à l'interieur d'une autre section.
par exemple "monFichier.ini":
Code:
1 2 3 4 5 6 7
|
[french]
moi=moi.bmp
toi=toi.bmp
[english]
me=me.bmp
you=you.bmp |
c'est mon code avec lequel je lis ce fichier.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| const char *strSection;
AnsiString A;
TIniFile *f;
AnsiString section;
TStringList *lSections = new TStringList();
f = new TIniFile("c:/monFichier.ini");
try
{
f->ReadSection(strSection, lSections);
for(int i=0 ; i < lSections->Count ; ++i)
{
section = lSections->Strings[i];
AnsiString Valeur = f->ReadString(strSection,section,"");
}
} |
j'aimerai lire le fichier suivant.
exemple:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
|
[french]
moi=moi.bmp
toi=toi.bmp
[nom]
monnom=xxx.bmp
tonnom=yyy.bmp
[english]
me=me.bmp
you=you.bmp
[name]
monname=xxx1.bmp
yourname=yyy1.bmp |
merci pour votre aide