Click here to Skip to main content
15,889,116 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: tricky thing with string Pin
Ilia Oussorov25-Jun-03 3:46
Ilia Oussorov25-Jun-03 3:46 
GeneralRe: tricky thing with string Pin
David Crow25-Jun-03 4:15
David Crow25-Jun-03 4:15 
GeneralRTX Program Pin
dadacncn25-Jun-03 3:10
dadacncn25-Jun-03 3:10 
GeneralCursor Position Pin
SatyaDY25-Jun-03 1:37
SatyaDY25-Jun-03 1:37 
GeneralRe: Cursor Position Pin
basementman25-Jun-03 4:22
basementman25-Jun-03 4:22 
GeneralRe: Cursor Position Pin
SatyaDY25-Jun-03 18:16
SatyaDY25-Jun-03 18:16 
Questionhow to detect the internet/network connect Pin
Tarundeep Singh Kalra25-Jun-03 1:05
Tarundeep Singh Kalra25-Jun-03 1:05 
AnswerRe: how to detect the internet/network connect Pin
David Crow25-Jun-03 2:52
David Crow25-Jun-03 2:52 
GeneralFile Read/Write Pin
chito25-Jun-03 0:55
chito25-Jun-03 0:55 
Hello,

I have a text file with the following layout.

COMMAND1
ITEM1 Value1 Value2 Value3 Valu4
ITEM2 Value1 Value2 Value3 Valu4
ITEM3 Value1 Value2 Value3 Valu4
ITEM4 Value1 Value2 Value3 Valu4
...
ITEM_N

COMMAND2
ITEM1 Value1 Value2 Value3 Valu4
ITEM2 Value1 Value2 Value3 Valu4
ITEM3 Value1 Value2 Value3 Valu4
ITEM4 Value1 Value2 Value3 Valu4
...
ITEM_N

COMMAND3
ITEM1 Value1 Value2 Value3 Valu4
ITEM2 Value1 Value2 Value3 Valu4
ITEM3 Value1 Value2 Value3 Valu4
ITEM4 Value1 Value2 Value3 Valu4
...
ITEM_N


....
COMMAND_N


In this file, I have to insert new items, or change values of items or delete existing items.

For suppose if I want to insert new item under "COMMAND1", what I am doing is, seeking the pointer to the end of "COMMAND1", writing remainig text into a temporary file, inserting my new text, then appending the text which is stored in temporary file. But I guess, it is not a best method. It takes much time every time I insert/edit text.

Is there any other alternative to do this. Can anybody tell what is the best method to do this.

Thanks & regards,
Chito

GeneralRe: File Read/Write Pin
Anonymous25-Jun-03 2:34
Anonymous25-Jun-03 2:34 
GeneralRe: File Read/Write Pin
valikac25-Jun-03 6:16
valikac25-Jun-03 6:16 
Generalanother quesion about regular dll Pin
gucy25-Jun-03 0:19
gucy25-Jun-03 0:19 
GeneralRe: another quesion about regular dll Pin
David Crow25-Jun-03 2:58
David Crow25-Jun-03 2:58 
GeneralGet your software done or undertake projects Pin
Anonymous24-Jun-03 23:53
Anonymous24-Jun-03 23:53 
GeneralRe: Get your software done or undertake projects Pin
Duncan Edwards Jones24-Jun-03 23:59
professionalDuncan Edwards Jones24-Jun-03 23:59 
GeneralRe: Get your software done or undertake projects Pin
Ryan Binns25-Jun-03 0:03
Ryan Binns25-Jun-03 0:03 
GeneralRe: Get your software done or undertake projects Pin
Neville Franks25-Jun-03 0:20
Neville Franks25-Jun-03 0:20 
QuestionHow to get WHOIS information in my app? Pin
wangdave24-Jun-03 23:48
wangdave24-Jun-03 23:48 
AnswerRe: How to get WHOIS information in my app? Pin
Nathan Blomquist25-Jun-03 2:08
Nathan Blomquist25-Jun-03 2:08 
AnswerRe: How to get WHOIS information in my app? Pin
User 665825-Jun-03 2:10
User 665825-Jun-03 2:10 
Questionhow to position a window in the exact center of screen Pin
Chanda.com24-Jun-03 23:47
Chanda.com24-Jun-03 23:47 
AnswerRe: how to position a window in the exact center of screen Pin
Ryan Binns24-Jun-03 23:56
Ryan Binns24-Jun-03 23:56 
QuestionWhere is the root directory ? Pin
rohit.dhamija24-Jun-03 23:38
rohit.dhamija24-Jun-03 23:38 
AnswerRe: Where is the root directory ? Pin
Ryan Binns24-Jun-03 23:58
Ryan Binns24-Jun-03 23:58 
GeneralRe: Where is the root directory ? Pin
rohit.dhamija25-Jun-03 1:48
rohit.dhamija25-Jun-03 1:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.