Oh...I think let me post my codes here and let you all see what's going wrong here...
Code:
j=0;
for (k=0; k<NumFeatureElement-1; k++){
for (j=0; j<Rows; j++){
if (j == Rows)
{fElementCountRE =0;
fcElementCountRE =0;}
if (table[j][0] == atof(UniqueFeatureElement[k]) )
{fElementCountRE += 1;}
if (table[j][0] == atof(UniqueFeatureElement[k]) && table[j][Columns-1] == 0 )
{fcElementCountRE +=1;}
fErrorRE = (float)fcElementCountRE/fElementCountRE*100; //A formula to calculate something...
//for (x=0; x<MAXVALUE; x++){
fErrorArrayRE[0] = fErrorRE;
//}
//fErrorRE =0;
}//End For
//fElementCountRE =0;
//fcElementCountRE =0;
}//End For
Explanation to my codes: I've already created a dynamic 2-D table using Calloc(). I've a set of data being inserted into this 2-D array. These data include binary values like "0,1,2..."
What I intend to do here:
Code:
First : Compare all the data in first column with all the data in last column.
(E.g: if both are having 0, than increase value of fcElementCountRE by 1)
After all the counting is done, fErrorRE is calculated using the above formula. Next it is stored into array: fErrorArrayRE[0].
Code:
Second : Now the value for K should increase by 1, which means now I'm still comparing data of first column with last column, but now the condition is: if last columns is having value of "1", increase fcElementCountRE by 1.
Note: fcElementCountRE is used again, I intend to make it become zero first, by failed...
So, after the counting is done, formula is applied again and value is now stored into fErrorArrayRE[1] this time.
Summary: Count and calculate, then place the calculated values in fErrorArrayRE[x] accordingly......
_____