hi,
I'm pulling my hair on this one already a long time...
if someone can give me some advice on this one ... thanks
Because my prog. is 1500+ lines i only give the piece that is important....
What happens :
1 -> I have files filled with numbers in one line....
2 -> I've separated them till i have an array f_sep_nums[a][b] (this is an char array...)
3 -> I've static a static array ne.Nof[m][o]
4 -> I compare all the numbers in ne.Nof[m][o] with f_sep_nums[a][b]
5 -> every time there is a match it will add 1 to the array countN[m][p]++
Everything works fine here... but now i want it to count max 1 of a row...
so I can calculate a percentage a row...
What do i need :
1 -> how can I change or add some code so I get countN[m][p]++ to only count 1 for every row if there is a match or multiple matches in a row, and of course 0 for that row if there is no match
Code:
for(a = 0; a <=totrows; a++)
{
for(b=1;b<=10;b++)
{
for(m=0;m<=99;m++)
{
for(o=1;o<=3;o++)
{
if(strcmp(f_sep_nums[a][b], ne.Nof[m][o]) == 0)
{
countN[m][p]++;
}
}
}
}
}
thanks