+ 1
how can i count the number of file size for each user?
how can i count the number of file size for each user username: DCB files: 0,0,50,35,79 so user DCB has only 3 files (files with 0 dont count)
6 odpowiedzi
+ 2
please explain your situation , I didn't understand
+ 2
int numofFiles = 0;
int files[5];
for(x = 0, x < 5, x++) {
if (files[x] != 0) {
numofFiles++;
}
}
cout << numofFiles;
Try this :)
+ 2
well #Syvered gave you what you're looking for ;)
+ 2
Let me know if it works
+ 1
i have an array with usernames and file sizes as listed above and i need to list each username with how many files he has.
username:ABC
files:467,334,500,169,724
(5 files)
0
Thanks Syvered i think it works but i have an array in a header which is file_sizes[82][5]