Having trouble trying to inspect each character read...if the character is not a Lower Case letter, write the character to a file called upper.txt . If the character is a Lower Case letter write the Upper Case version of the character to the same file upper.txt.
I can use islower(), isupper(), toupper functions in the cctype library.
Here's what I have so far, just kind of stuck at this point.
Can you elaborate on that ? I'm taking the text from the actual file message.txt, and creating/ putting data into upper.txt . I don't understand why I would need to create 2 output files.
I'm not sure at this point.. Do I have to have outFile open before inFile ? I say this because I am getting errors when I switch line 43. I feel like I am a little mixed up maybe.
Here's the logic of what you need to do, with a lowercase letter:
Convert it to upper case
Write it to outfile
What your code currently does with a lowercase letter is this:
Convert it to upper case
Fetch a new letter from the infile and immediately write that to the outfile, completely ignoring the letter you just converted to upper case
I'm striking out over here. What am I missing ? I'm just getting started on c++ if you couldn't already tell. The program just sits there and does nothing right now. Its trying to write something to upper.txt, but it leaves it open and isn't completing the loop ( even if it is wrong).
wow.. that makes perfect sense now. I appreciate it! so now "My Text File" reads like this "MYTEXTFILE". Is there a good way to include the space's from the original file to read like this "MY TEXT FILE"