473,387 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Chars in file

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.
Jul 19 '05 #1
2 1493
"Daniel" <th*******@poczta.fm> wrote
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.
Jul 19 '05 #2

"Buster" <no***@nowhere.com> wrote in message
news:bk**********@news8.svr.pol.co.uk...
"Daniel" <th*******@poczta.fm> wrote
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.


Of course you have to determine what a "char" is. CR/LF? Space? etc.
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Nick | last post by:
Hi ! I want to load an old Pascal-Dos-File where records stand in. When i view the file in a HEX-Editor it's clear how to acces these Strings and chars in that file. Since these are old 8BIT...
2
by: Xam | last post by:
Hello everybody Do you know of a javascript routine that can warn if there are any pre-defined invalid chars in the filename of an INPUT file box before it is submitted with the submit button. ...
9
by: spike | last post by:
I use this code to read number of characters from a file. The problem is: It only returns about 1500 chars. If i open the file in a text editor it contains almoust 3 million rows. Sure it must...
2
by: Derrick | last post by:
Is it possible? I installed all the language scripts on my XP box, can see russian chars in unicode xml file, but not chinese chars. See the same thing in tree view as when i look at xml file in...
8
by: Nikolay Petrov | last post by:
I need a way to strip chars from a string. The chars are all chars that are not allowed in file path. TIA
2
by: ImageAnalyst | last post by:
Tom, Nikolay: That code doesn't work, at least not in VS2005. What happens is that when you replace with VBNullChar, it basically chops off the string from that point onwards. So Sna?*|fu" would...
1
by: tomtiv | last post by:
Hi All, I am having a probem with asp, xml, com while using chinese chars. The chinese letters come out of com fine and they are also fine when i use asp to write to a text file. When i load...
3
by: Yobbo | last post by:
Hi All I have an ASP function in place to strip invalid chars out of a data store before I create an XML file of this data, but my function doesn't work on a certain set of chars. As far as I...
2
by: Grzegorz Danowski | last post by:
Hello, I have made few reports in rdlc technology. They look and print fine, but if I export any report to pdf file I have some problems with polish specific chars: a. if I open pdf in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.