hello
I am reading a text file & trying to store some information into a 2d array.
My problem is when I go to store a piece of data into the 1st row (1d area ?:P) I get this error
error:
incompatible types in assignment of `float' to `float[25]'
For eg, I want to store 25.5 where x is
pur[x][];
My function:
float pur[53][25]; // Purchases Array [week number][purchase no.1, p2, pn...]
ifstream infile;
float x;
int count = 0;
int count2 = 0;
while (infile >> x) {
pur[count] = x; // error occurs here
while (x!=(char)'\n') {
pur[count][count2]= x;
count2++;
}
count2 = 0;
count++;
}