Question is simple and here it goes :) i am looking for a normalized solution :)
Write a C++ program to read the file (irespective of content length i.e 10+ paragraphs ) and count the number of occurrences of each letter (ignore the letter case) and digit found in it.
For example, if the book had a single line (which is of course not the case in original case): "AaBCcc12" the program would display: A: 2 B: 1 C: 3 1: 1 2: 1
Cheers Ty :)
Kiran

VulpesPosted Nov 11, 2013, 6:00 AM
SUNIL GUTTAPosted Nov 13, 2013, 12:57 PM
VulpesPosted Nov 13, 2013, 11:22 AM
However, when reading whole files, it's generally best to read as many characters as you can into memory in one chunk.
This avoids having to return to the file buffer, the cache or the disk itself each time a character is read which is likely to be slower than reading them line by line.
SUNIL GUTTAPosted Nov 13, 2013, 2:40 AM
Please can u check the link :)
http://www.c-sharpcorner.com/Forums/Thread/237742/calculation-on-text-file.aspx
Thank you
SUNIL GUTTAPosted Nov 13, 2013, 2:27 AM
Thank you
VulpesPosted Nov 12, 2013, 5:10 AM
The system looks there first if you don't specify the full path of a file.
It also keeps everything together.
SUNIL GUTTAPosted Nov 11, 2013, 8:37 PM
it keeps on saying unable to find the find file ?
I usually save files on desktop :)
How to optimize the issue ? do i need to save the file in which location ?
program folder ?? else any remedy ?
Ty boss