![]() |
|
#1
|
|||
|
|||
reading a file twiceHi, I am writting a program that needs to read a file once, do some calculations, then read it again from the top and perform some new calculations. I have been able to read the file the first time using
CPP / C++ / C Code:
Thanks stevies24 |
|
#2
|
|||
|
|||
|
You should use the rewind() function immediately before your second loop:
CPP / C++ / C Code:
|
|
#3
|
||||
|
||||
|
Quote:
As sdeming said, use rewind(). Or close and reopen the file as you surmised. Either is acceptable. __________________
Age is unimportant -- except in cheese |
|
#4
|
|||
|
|||
|
Quote:
Ok, thanks for your help. I've got it worked using the code in the tutorial and the review() function. Thanks |
Recent GIDBlog
Meeting the populace by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reading from file | jmenendezr | C++ Forum | 2 | 26-Feb-2006 16:00 |
| CD burner wont burn!! | robertli55 | Computer Hardware Forum | 1 | 18-Jun-2004 10:53 |
| Yet another CD burner problem: Lite-On LSC-24082K | Erwin | Computer Hardware Forum | 1 | 22-May-2004 11:28 |
| Re: Programming Techniques | WaltP | C Programming Language | 0 | 09-Mar-2004 23:56 |
| reading and writing to a file in C++ | mgp6q | C++ Forum | 17 | 02-Mar-2004 12:42 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The