If so I wrote the following. Which does not seem to work:
Code:
#include <iostream.h>
#include <stdlib.h>
#include <fstream>
int main()
{
char fileName;
int noOfReadings;
cout<<"How many lines of data are there?"<<endl;
cin>> noOfReadings;
double wind[noOfReadings][noOfReadings];
cout<<"Enter the name of the input file: " <<endl;
cin>> fileName;
cin.ignore(80,'n');
ifstream myDataFile;
myDataFile.open(fileName);
myDataFile>>wind;
for(int i=0;i<noOfReadings;i++)
{
myDataFile>>wind(i);
}
system("PAUSE");
return 0;
}
Any idea why not?
Cheerz Will