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
|
int handle;
char ch;
String chaine="";
String Code,Code2;
if (OpenDialog1->Execute())
Code=OpenDialog1->FileName;
if (OpenDialog1->Execute())
Code2=OpenDialog1->FileName;
const char* temp=Code.c_str();
handle = open(temp,O_CREAT | O_RDWR|O_TEXT,S_IREAD | S_IWRITE);
lseek(handle, 0L, SEEK_SET);
do
{
read(handle, &ch, 1);
if (ch!='\n') chaine=chaine+ch;
if ((ch == '\n')||(eof(handle)))
{
Chart1->SeriesList->Series[0]->Add(StrToFloat(chaine),"" , clLime ) ;
chaine="";
}
}while (!eof(handle));
close(handle);
//Fichier2
temp=Code2.c_str();
handle = open(temp,O_CREAT | O_RDWR|O_TEXT,S_IREAD | S_IWRITE);
lseek(handle, 0L, SEEK_SET);
do
{
read(handle, &ch, 1);
if (ch!='\n') chaine=chaine+ch;
if ((ch == '\n')||(eof(handle)))
{
Chart1->SeriesList->Series[1]->Add(StrToFloat(chaine),"" , clLime ) ;
chaine="";
}
}while (!eof(handle));
close(handle); |
Partager