I read an integer number :
is >> myInteger;
Now I want to know how many digits were read (I'm talking of the possible leading zeros). How can I do that?
You can:
get the value as a string, then parse it separately, however you wish (check length, count zeros, etc).
use is.tellg for this; Keep in mind that tellg will give you buffer positions, not not what was at those positions (it could be space characters or zeros)
read the buffer character by character using is.get, then process values according to your needs.