Click here to Skip to main content
15,919,434 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Link for sending mails Pin
Jack_pt21-Aug-03 16:04
Jack_pt21-Aug-03 16:04 
QuestionHow Do I Detect DAO Installed? Pin
John Clump20-Aug-03 20:12
John Clump20-Aug-03 20:12 
AnswerRe: How Do I Detect DAO Installed? Pin
Dominik Reichl20-Aug-03 21:06
Dominik Reichl20-Aug-03 21:06 
AnswerRe: How Do I Detect DAO Installed? Pin
Joel Lucsy21-Aug-03 2:14
Joel Lucsy21-Aug-03 2:14 
GeneralFile Access Time Pin
wow999920-Aug-03 20:10
wow999920-Aug-03 20:10 
GeneralRe: File Access Time Pin
Dominik Reichl20-Aug-03 20:52
Dominik Reichl20-Aug-03 20:52 
GeneralRe: File Access Time Pin
vcplusplus21-Aug-03 2:45
vcplusplus21-Aug-03 2:45 
Generalread file from end to beginning Pin
rohit.dhamija20-Aug-03 19:47
rohit.dhamija20-Aug-03 19:47 
Dear All,

I am developing an application in MFC VC++ Version 6.0 for Windows 2000.
I have a structure of format
//////////////////////////
struct ren
{
char src[150];
char desc[150];
};
//////////////////////////

I am fillng this structure with some values and then store this structure in a file for unfixed number of times (there may be more than

1000 entries and at same time no entry) during my program execution.

And at an click of event i read this file as
/////////////////////////////////////////////////
OFSTRUCT of;
HFILE hfile = OpenFile(RenFile,&of,OF_READ);
do
{
n=_lread(hfile,(char *)&ren,sizeof(ren));
....................................
....................................
....................................

}
while(n!=0);
_lclose(hfile);
/////////////////////////////////////////////////

This piece of code reads the structure from the beginning of file till END OF FILE structure by structure. Now I want to it to read the other way round!!
ie. I want to read the file from last structure to the beginning of file in an efficient manner.
ie.
if the file containts the entries
ram kali--------(1)
hari kumar--------(2)
lal singh --------(3)
the file should read 3 structure first , then second and then first.

Please send your useful suggestions.




Feel free to ask any further queries in this regards,

Thanks
Rohit Dhamija




GeneralRe: read file from end to beginning Pin
igor196020-Aug-03 20:29
igor196020-Aug-03 20:29 
GeneralRe: read file from end to beginning Pin
rohit.dhamija20-Aug-03 20:50
rohit.dhamija20-Aug-03 20:50 
GeneralRe: read file from end to beginning Pin
igor196020-Aug-03 21:23
igor196020-Aug-03 21:23 
GeneralRe: read file from end to beginning Pin
J. Dunlap20-Aug-03 21:35
J. Dunlap20-Aug-03 21:35 
GeneralRe: read file from end to beginning Pin
Member 42425920-Aug-03 22:20
Member 42425920-Aug-03 22:20 
GeneralRe: read file from end to beginning Pin
Member 42425920-Aug-03 22:21
Member 42425920-Aug-03 22:21 
GeneralRe: read file from end to beginning Pin
rohit.dhamija20-Aug-03 22:53
rohit.dhamija20-Aug-03 22:53 
GeneralRe: read file from end to beginning Pin
rohit.dhamija20-Aug-03 23:03
rohit.dhamija20-Aug-03 23:03 
GeneralRe: read file from end to beginning Pin
Branislav21-Aug-03 0:39
Branislav21-Aug-03 0:39 
GeneralGreen border with round edges around buttons Pin
nikimonkey20-Aug-03 17:08
nikimonkey20-Aug-03 17:08 
GeneralRe: Green border with round edges around buttons Pin
PJ Arends20-Aug-03 17:20
professionalPJ Arends20-Aug-03 17:20 
GeneralRe: Green border with round edges around buttons Pin
nikimonkey20-Aug-03 17:29
nikimonkey20-Aug-03 17:29 
GeneralRe: Green border with round edges around buttons Pin
J. Dunlap20-Aug-03 18:11
J. Dunlap20-Aug-03 18:11 
GeneralRe: Green border with round edges around buttons Pin
Branislav21-Aug-03 0:09
Branislav21-Aug-03 0:09 
GeneralQuestion about global variables in C/C++. Pin
George220-Aug-03 17:02
George220-Aug-03 17:02 
GeneralRe: Question about global variables in C/C++. Pin
PJ Arends20-Aug-03 17:15
professionalPJ Arends20-Aug-03 17:15 
GeneralRe: Question about global variables in C/C++. Pin
George220-Aug-03 17:58
George220-Aug-03 17:58 

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.