Hi,
This code works fine:
Code:
#include<iostream.h>
#include<stdio.h>
#include<conio.h>
#include<ctype.h>
void main()
{
FILE *daten;
int i;
float x[5], y[5];
clrscr();
daten=fopen("a:dat.txt","r");
for (i=0;i<=4;i++)
fscanf(daten,"%f%f",&x[i],&y[i]);
for (i=0;i<=4;i++)
cout<<x[i]<<y[i];
fclose(daten);
getch();
}
Only the file dat.txt has to contain numbers only(including a sign), and must not contain any other characters.
I`d like to process a hpgl plotter file, which
looks somewhat like this:
PU-123 234;
PD345 567;
PD346 568;
IŽd like to get rid of everything but the numbers.
I did experiment with fseek, but wasn`t very succsessful.
Has anyone a routine that I could use ?
appreciate,
Johannes