473,394 Members | 1,806 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Retrieving the address of a record in a text file

Good Morning every one;

I'm attending to apply indexes concept using c++ text files.

I need to create two text files, one for index, the other for data records.

I should insert/delete records to the text file according to physical address of the line, not to the number of the line in the text file.

My problem is to get the address of the line I need to insert/delete from.

Hope you understood me.
any help !?
Is there any body who knows how to retrieve the physical address of a text file line ??


Thanks all.
Oct 24 '11 #1
2 1662
weaknessforcats
9,208 Expert Mod 8TB
What you want to do is use seek() ad tell() to get the locations in the file.

You can insert and delete records based on how you created the file.

I suggest you use a flat file until you master the mechanics if file management.
Oct 24 '11 #2
Thenk you, I'll try using seek and tell.

Thanks again
Oct 26 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Kim Jensen | last post by:
Hi there I currently have a .txt file (lets call it jimharper.txt) that holds a number of arrays like for instance: $name = "Jim Harper" $relatives = "Joan Harper (wife)" $relatives =...
6
by: Ruben | last post by:
Hello. I am trying to read a small text file using the readline statement. I can only read the first 2 records from the file. It stops at the blank lines or at lines with only spaces. I have a...
2
by: Joey Martin | last post by:
I have been reading documentation on parsing. I need some help though. I have the following in a text file: $650 Number of Bedrooms 3 Air Conditioning? Yes Original Ad SOUTH, 3BR, air, basement....
5
by: osmethod | last post by:
Hello, I'd appreciate any help which is offered to my problem. I'm using Acess 97. I have a flat text file which lists names and addresses. Sometimes, these can be 4 lines and sometimes 5...
4
by: Jay | last post by:
This is a strange one that I can't seem to find a fix for. We have a Billing DB application (Access 2000 format) where we upload billing info in a comma delimited text file to our printer who...
8
by: MLH | last post by:
Am trying to import 20,000+ lines of text in a file FTP'd from a UNIX platform to windows via FTP session in a DOS box. About 2000 records have multiple lines in them separated by CRLF's. ...
1
by: vivekgrs | last post by:
hi in the text file iam having the data as mention below.i want 2 retrieve thru vb. 2 34 56 98 245 i want 2 retrive the data individually which is...
11
by: Timofmars | last post by:
I'm try to Unload DB2 data from a table into a record sequential file on NT. I can an unload on Mainframe, but it doesn't seem to be an option in NT. In NT, all I can do is export/import. I can...
1
by: hanusoft | last post by:
This is an example of Inserting and Retrieving data from xml file. private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here ...
1
by: hanusoft | last post by:
This is an example of Inserting and Retrieving data from xml file. private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.