Click here to Skip to main content
12,626,014 members (26,489 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: Data
put some txt file in one file and you can seek them fast,how to implement?


use what data struct and how to implement? thx.
Posted 6-Jul-12 22:03pm
zqliu359
Comments
Raja Soosai 7-Jul-12 5:47am
   
give little more details pls
zqliu 7-Jul-12 13:02pm
   
now have some txt files(such as 1.txt, 2.txt,3.txt...);

open them and read them into allinone.txt one by one;

if i say 3.txt,u can find where it is in allinone.txt fast,not from beginning

use what data struct and how to implement? thx
Wes Aday 7-Jul-12 7:37am
   
Please post the code where you put a text file inside another file. Then clearly explain what it is that you mean by "seek them fast".
zqliu 7-Jul-12 12:59pm
   
now have some txt files(such as 1.txt, 2.txt,3.txt...);

open them and read them into allinone.txt one by one;

if i say 3.txt,u can find where it is in allinone.txt fast,not from beginning

use what data struct and how to implement? thx
   
Do you understand that it does not explain anything? You don't explain by what criteria do you want to search, by index, sub-string or something. If you would like to use the whole content of the file as a search sub-string, you do not to search anything. Also, why doing all that?
--SA
zqliu 8-Jul-12 0:58am
   
i just want to know where the 3.txt begin in all.txt,

use what data struct and how to implement? thx.

by what criteria ,it doesnot matters.by index OR sub-string IS OK
Sergey Alexandrovich Kryukov 11-Jul-12 15:37pm
   
The word "seek" implies search criteria, is it not. Unless you mean completely different meaning.
--SA
zqliu 11-Jul-12 23:03pm
   
by index OR sub-string IS OK.
use what data struct and how to implement? thx
aspnet_regiis 8-Jul-12 14:06pm
   
what???
zqliu 17-Jul-12 11:57am
   
by index OR sub-string

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161205.3 | Last Updated 7 Jul 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100