something understandless

how i can display the temperature data in this question
and the what the problem in this function

Define a function reading a .csv formatted file with mean daily temperature data - the file name shall be a parameter - and storing read temperature data into an - also given as parameter - two-dimensional array for the 12 month and maximum 31 days each month.
The to be read ASCII text file consists of two columns separated by a semicolon; in the first column the date is given in german notation day.month.year, in the second column the temperature as a floating point number (example files: duisburg-2015.csv, duisburg-2016.csv, duisburg-2017.csv).



string readfile (string readfile,float array [][12],int days)
{ int days=31;
int mounth;
ifstream inFile;
inFile.open(readfile);
if (!infile.is_open())
{
cerr<<"error opening file"<<readfile<<endl;

}
else
cout<<"input file"<<readfile<<"oppend"<<endl;
for(int mounth=0;mounth<12;mounth++)
{
for(int days=o;days<31;days++)
{
cout<<array[days][mounth];
}
cout<<"\t";
}

Where do you read data from file?

If function is for reading, then then that is the only thing it should do. Some other function will display data.
Topic archived. No new replies allowed.