Hello, I would ask how to read how many total characters are in a binary file.
For example, the following strings are written in a binary file
Helloworld/0asdf/0thisisastring/0
There are no empty spaces and /0 is the terminating symbol.
So I have the task to determine the average number of characters in each string.
In this case it would be 27/3 = 9
Now my question is how to find out how many total characters are there and then divide them by the number of terminating symbols. (also how to find out the number of the terminating symbols)
ne555 has given you pseudo code because, you're right, it's not that hard. Here's mine: Read every character and count the NULLs, when the EOF is reached, look at the stream position.