0

Hi!

I was wondering if someone might have an example of this that I might could take a look at, would really appreciate it since we have a test in about a week.

Thanks in advance!

Adam

3
Contributors
2
Replies
4
Views
7 Years
Discussion Span
Last Post by NathanOliver
0

Hi!

I was wondering if someone might have an example of this that I might could take a look at, would really appreciate it since we have a test in about a week.

Thanks in advance!

Adam

Hello

I think that noone will give you the source, because this is just like a homework :)

Anyway the theorie is simple. You open the first file for read. Then open the second file for write(create and write).
With While:
you read a line(string) from first file, run on it the for (i to line.length() ) and uppercase/lowercase each char. When the "for" finnished you write the line(string) to the second file.
And repeat this till you are at the end of first file (nothing can be read). Then close it.


Shorter in steps:
-ask for filename for both files
-open both files (first = read, second=write)

-while ( not end of first file){
-read a line from first file
-upper/lower case all chars with for
-write the line to second file
}
-close both files
.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.