FILE *stream; int x, y; stream = fopen("file.txt", "r"); while (fscanf(stream, "%d %d", &x, &y) != EOF) { Memo1->Lines->Add("x = " + IntToStr(x) + ", y = " + IntToStr(y)); } fclose(stream);