Click here to Skip to main content
15,887,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Reading Unicode from a text file Pin
Michael Schubert26-Mar-09 2:50
Michael Schubert26-Mar-09 2:50 
GeneralRe: Reading Unicode from a text file Pin
LCI26-Mar-09 2:52
LCI26-Mar-09 2:52 
GeneralRe: Reading Unicode from a text file Pin
Michael Schubert26-Mar-09 2:57
Michael Schubert26-Mar-09 2:57 
GeneralRe: Reading Unicode from a text file Pin
LCI26-Mar-09 3:27
LCI26-Mar-09 3:27 
GeneralRe: Reading Unicode from a text file Pin
Michael Schubert26-Mar-09 3:41
Michael Schubert26-Mar-09 3:41 
GeneralRe: Reading Unicode from a text file Pin
Cedric Moonen26-Mar-09 3:33
Cedric Moonen26-Mar-09 3:33 
AnswerRe: Reading Unicode from a text file Pin
Sarath C26-Mar-09 3:05
Sarath C26-Mar-09 3:05 
Questionfseek () Pin
Anu_Bala26-Mar-09 2:00
Anu_Bala26-Mar-09 2:00 
Hi,

Im reading one .dat file which contains lots of data.
Im using vc++ console application.

I that i have to read particular 3rd line,27th line like this.
SO i planned to use fseek but we can give starting character number only..not line number.
How can i do that..
My code
if((stream = fopen( "D:\\phylib.dat", "r" )) == NULL )
printf( "The file 'data' was not opened\n" );
else
{
fseek( stream, 23L, SEEK_SET);
while(fgets(list, 500, stream)!=NULL)
{
....
}


My file look like this
$
/DATA
/DID = 1
/TLIQ= -100.00 400.00
/TVAP= -100.00 400.00
/TSOL= 0.00 0.0
.
.
.

./DATA
/DID = 2
/TLIQ= -100.00 400.00
/TVAP= -100.00 400.00
/TSOL= 0.00 0.00

I want to read particular /DID line to get the value in right side.Pls help me...

Anu

AnswerRe: fseek () Pin
Code-o-mat26-Mar-09 2:08
Code-o-mat26-Mar-09 2:08 
GeneralRe: fseek () Pin
Anu_Bala26-Mar-09 2:10
Anu_Bala26-Mar-09 2:10 
GeneralRe: fseek () Pin
CPallini26-Mar-09 2:49
mveCPallini26-Mar-09 2:49 
AnswerRe: fseek () Pin
Cedric Moonen26-Mar-09 2:11
Cedric Moonen26-Mar-09 2:11 
AnswerRe: fseek () Pin
«_Superman_»26-Mar-09 2:19
professional«_Superman_»26-Mar-09 2:19 
JokeA silly question ... Pin
Joseph Marzbani26-Mar-09 1:39
Joseph Marzbani26-Mar-09 1:39 
GeneralRe: A silly question ... Pin
CPallini26-Mar-09 1:42
mveCPallini26-Mar-09 1:42 
GeneralRe: A silly question ... Pin
Joseph Marzbani26-Mar-09 1:53
Joseph Marzbani26-Mar-09 1:53 
Questionhow to save/load an OLE object CRichEdit::StreamOut / In Pin
Joseph Marzbani26-Mar-09 1:28
Joseph Marzbani26-Mar-09 1:28 
AnswerRe: how to save/load an OLE object CRichEdit::StreamOut / In Pin
David Crow26-Mar-09 3:04
David Crow26-Mar-09 3:04 
AnswerRe: how to save/load an OLE object CRichEdit::StreamOut / In Pin
Stuart Dootson26-Mar-09 3:05
professionalStuart Dootson26-Mar-09 3:05 
QuestionFatal Error-WinDef.h Pin
T.RATHA KRISHNAN26-Mar-09 0:16
T.RATHA KRISHNAN26-Mar-09 0:16 
AnswerRe: Fatal Error-WinDef.h Pin
Joseph Marzbani26-Mar-09 1:33
Joseph Marzbani26-Mar-09 1:33 
GeneralRe: Fatal Error-WinDef.h Pin
led mike26-Mar-09 4:27
led mike26-Mar-09 4:27 
Questiontwo MFC DLL Project Pin
akira3226-Mar-09 0:13
akira3226-Mar-09 0:13 
QuestionRe: two MFC DLL Project Pin
CPallini26-Mar-09 0:22
mveCPallini26-Mar-09 0:22 
AnswerRe: two MFC DLL Project Pin
led mike26-Mar-09 4:30
led mike26-Mar-09 4:30 

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.