i need to make a program that reads in a file and list things like
the number of characters,words lines spaces tabs etc.
anyone know the best way to do this?
any help anyone can provide is appreciated

thanks

Recommended Answers

All 2 Replies

i need to make a program that reads in a file and list things like
the number of characters,words lines spaces tabs etc.
anyone know the best way to do this?
any help anyone can provide is appreciated

thanks

Make a list what you need to keep track of.
Add to each of these items what indicates the item -- meaning if you need to count words, what indicates the end of a word?

There is never a best way. There are hundreds of ways to do any program. Keep in mind the word best rarely if ever really exists in computers.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.