Difference:
CSC121F2023Lab08Hint3
( vs. 1)
Revision 1
2023-06-20 -
cathybareiss
Line: 1 to 1
Added:
>
>
META TOPICPARENT
name="CSC121F2023Lab08"
Hints to copy a file
The basic idea:
open one file for reading and the other for writing
while not at the end of file of the input file
read the current line from the input file
write it to the output file
close both files
To change a given line
add a counter to your loop
if it is not the line you want, continue as normal
if it is the line you want, write the change (but don't forget to count this line).
View topic
|
H
istory
:
r1
|
More topic actions...
Copyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback