Chars in file

D

Daniel

How can I find how much chars is in file when I open the file by ifstream?
How can I count an amount of chars in this file?
Not size of file.

d.
 
B

Buster

Daniel said:
How can I find how much chars is in file when I open the file by ifstream?
How can I count an amount of chars in this file?
Not size of file.

Either count them, one by one, or if each
character has the same size, divide the size
of the file by the size of a character.

Regards,
Buster.
 
J

jeffc

Buster said:
Either count them, one by one, or if each
character has the same size, divide the size
of the file by the size of a character.

Of course you have to determine what a "char" is. CR/LF? Space? etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,141
Messages
2,570,818
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top