Hi! I am having trouble with this program. I'm done with the creation of records. My problem is, I cant make it print a record using the Record Number inputted by the user. I used seekg() but it doesn't work. I have attached the files for reference. try.cpp and accounts.txt
I forgot to say that you should rename accounts.txt to accounts.dat.
aladar04
0
Light Poster
Recommended Answers
Jump to PostYou have bytesPerRecord=38
but accounts.txt has different size of records which ultimately messing up your seekg calculation. Make sure all the records in account.txt is of size 38 bytes.
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.