• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

File Problem

Kirby

Lifer
I'm trying to writing a program for my CS class that uses files (fstream). My program compiles but i get a error when linking (LNK1104). I'm using Visual Studio 2005. I'm opening two files, and comparing them. Here's the function...

UPDATE I changed getch() to _getch() and I think it got rid of the linking problem, but now I'm having trouble with the files. I want it to open the first file, open the second file, compare, then go to the second set of data in the second file, and continue checking until it reaches the end of the second file (register.txt). It should close register and open it again, making register start over checking. well apparently it's not starting register over when i close and open it again. Does anyone have a clue how to start a file over?
 
Why go through the hassles of opening and closing the file

Just do an equivlent to fseek (BEGIN).
 
i couldn't get the pointer thing to work, so i read it into an array that way i could easily choose what position i'm in. whatever, it works.
 
Back
Top