Thread: textfiles

  1. #1
    Registered User
    Join Date
    Feb 2003

    Question textfiles

    I need to know how to write a program which opens a textfile and counts how many spaces and vowels it contains. The name of the file should be read in from the user. If the file could not be opened (because it does not exist, for example) the program reports an error message and stops.
    Note that the vowels are counted, whether they are upper or lower case. One way to overcome this is to uppercase the character read in from the file, using the toupper( ) function. Then compare the character to the set of uppercased vowels.

    Can you help me?

  2. #2
    Registered User
    Join Date
    Aug 2002
    Hermosa Beach, CA
    >Can you help me?

    Sure, sounds like an interesting homework assignment. Let's see what you have written, and we'll go from there.
    The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Scan Textfiles
    By Coding in forum C++ Programming
    Replies: 19
    Last Post: 02-07-2008, 06:27 AM
  2. reading textfiles using variable names
    By rjcarmo in forum C++ Programming
    Replies: 3
    Last Post: 05-13-2003, 02:05 PM