Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 08-13-2009, 05:53 PM   #1 (permalink)
Kdar's Avatar
 
Ultra Techie

Join Date: Dec 2005

Posts: 870

Kdar is on a distinguished road

Default Counting capital letters?

What would be logic of a program that would count capital letters inside a text file (document)?

Maybe using C or C++... or anything related.
Kdar is offline  
Old 08-13-2009, 06:03 PM   #2 (permalink)
 

Join Date: Jul 2005

Location: England

Posts: 2,159

kmote has a spectacular aura aboutkmote has a spectacular aura about

Default Re: Counting capital letters?

Open a file stream, iterate through using isupper isupper - C++ Reference

PS I had to laugh. I didn't take me long to forget almost everything I knew about c.

EDIT: bit more info
Code:
file = fopen
do
int = getc
if isupper int
counter++
while condition
I will leave you to fill in the blanks.
__________________
MSI P43 Neo|Enermax Pro82+ 425W|E5200|silent 8500GT|250GB Samsung spinpoint F1|Samsung SATA DVD RW|4GB Corsair|Antec SOLO|openSUSE11


There are in order of increasing severity: lies, darn lies, statistics, and computer benchmarks. - diskinfo man page

Last edited by kmote; 08-13-2009 at 06:07 PM.
kmote is online now  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Drive Letters During Setup Blenders11 Windows Operating Systems and Software 1 04-27-2009 03:02 PM
Drive letters different in XP and Vista Niverive Windows Operating Systems and Software 2 01-14-2009 10:14 PM
My keyboard jumps letters x-treme Windows Operating Systems and Software 4 04-12-2008 02:36 PM
Applications Counting steak1986 Windows Operating Systems and Software 0 09-25-2007 11:53 AM
IPhone Has 68 Bugs And Counting Osiris Phones – PDA’s – Bluetooth – Other handhelds 1 07-17-2007 01:25 PM