Click here to Skip to main content
15,917,617 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDebug without other threads stopped! Pin
reza matinnejad14-Feb-07 19:51
reza matinnejad14-Feb-07 19:51 
AnswerRe: Debug without other threads stopped! Pin
Michael Dunn14-Feb-07 20:15
sitebuilderMichael Dunn14-Feb-07 20:15 
GeneralRe: Debug without other threads stopped! Pin
reza matinnejad14-Feb-07 22:43
reza matinnejad14-Feb-07 22:43 
AnswerRe: Debug without other threads stopped! Pin
reza matinnejad14-Feb-07 20:34
reza matinnejad14-Feb-07 20:34 
GeneralRe: Debug without other threads stopped! Pin
Waldermort14-Feb-07 22:52
Waldermort14-Feb-07 22:52 
GeneralRe: Debug without other threads stopped! Pin
reza matinnejad14-Feb-07 22:57
reza matinnejad14-Feb-07 22:57 
GeneralRe: Debug without other threads stopped! Pin
Waldermort14-Feb-07 23:12
Waldermort14-Feb-07 23:12 
QuestionSeekg problem in text file? [modified] Pin
Vishvanathan14-Feb-07 19:33
Vishvanathan14-Feb-07 19:33 
Hi,

I am working in text file application.In that application, to opening the file in read only mode like
fstream lpFile;
lpFile.open ( "sample.txt", ios::in );

then i read the file using this file pointer and some times , i move the pointer back to 1 position from current position using seekg ( -1, ios::cur ).

Text file size : 15 KB

Problem:

I couldn't move the file pointer to back using seekg function ( in some case only).I tried to clear the error flag if any before the seekg function. but no result.The problem still continue...
lpFile.clear ( );
lpFile.seekg ( -1, ios::cur );

Sample Text File:
[General]
To read the file information
like name,address,mobile number
[Address1]
Name=vichu
Address=India
Mobile=+919994445550
[Address2]
...
[Addressn]
Name=vishva
Address=chennai
mobile=100

****end of file-----
this is raw text file.

program code:
char chData;
lpFile.get ( chData );
while ( chData != '[' )
{
...
...
}

lpfile.clear ( );
lpFile.seekg ( -1, ios::cur );

Again start the above loop from '[' character.

The seekg function not work sometimes. How can i solve the probelm?

Is there any tool available to find the special character or unknown character in text file?

Thanks & Regards,






-- modified at 2:19 Thursday 15th February, 2007

Vichu

AnswerRe: Seekg problem in text file? Pin
kakan14-Feb-07 23:48
professionalkakan14-Feb-07 23:48 
GeneralRe: Seekg problem in text file? Pin
Vishvanathan15-Feb-07 0:09
Vishvanathan15-Feb-07 0:09 
GeneralRe: Seekg problem in text file? Pin
kakan15-Feb-07 0:17
professionalkakan15-Feb-07 0:17 
GeneralRe: Seekg problem in text file? Pin
Vishvanathan15-Feb-07 0:34
Vishvanathan15-Feb-07 0:34 
GeneralRe: Seekg problem in text file? Pin
Vishvanathan21-Feb-07 23:35
Vishvanathan21-Feb-07 23:35 
AnswerRe: Seekg problem in text file? Pin
krmed15-Feb-07 0:41
krmed15-Feb-07 0:41 
GeneralRe: Seekg problem in text file? Pin
Vishvanathan21-Feb-07 23:38
Vishvanathan21-Feb-07 23:38 
QuestionFile manage problem. Pin
david bagaturia14-Feb-07 19:31
david bagaturia14-Feb-07 19:31 
AnswerRe: File manage problem. Pin
Don Box14-Feb-07 19:35
Don Box14-Feb-07 19:35 
AnswerRe: File manage problem. Pin
Nibu babu thomas14-Feb-07 20:05
Nibu babu thomas14-Feb-07 20:05 
AnswerRe: File manage problem. Pin
Michael Dunn14-Feb-07 20:17
sitebuilderMichael Dunn14-Feb-07 20:17 
GeneralRe: File manage problem. Pin
david bagaturia14-Feb-07 20:31
david bagaturia14-Feb-07 20:31 
QuestionRe: File manage problem. Pin
Nibu babu thomas14-Feb-07 21:21
Nibu babu thomas14-Feb-07 21:21 
AnswerRe: File manage problem. Pin
david bagaturia14-Feb-07 21:51
david bagaturia14-Feb-07 21:51 
QuestionAppending & inseting Text in RichEdit Pin
Swapnil G14-Feb-07 18:52
Swapnil G14-Feb-07 18:52 
AnswerRe: Appending & inseting Text in RichEdit Pin
Hamid_RT14-Feb-07 20:57
Hamid_RT14-Feb-07 20:57 
AnswerRe: Appending & inseting Text in RichEdit Pin
Mark Salsbery15-Feb-07 7:04
Mark Salsbery15-Feb-07 7:04 

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.