Click here to Skip to main content
Rate this: bad
good
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 21:03pm
zqliu359
Comments
Raja Soosai at 7-Jul-12 5:47am
   
give little more details pls
zqliu at 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 at 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 at 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
Sergey Alexandrovich Kryukov at 7-Jul-12 21:17pm
   
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 at 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 at 11-Jul-12 15:37pm
   
The word "seek" implies search criteria, is it not. Unless you mean completely different meaning.
--SA
zqliu at 11-Jul-12 23:03pm
   
by index OR sub-string IS OK.
use what data struct and how to implement? thx
aspnet_regiis at 8-Jul-12 14:06pm
   
what???
zqliu at 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
0 mhegazy94 460
1 Sergey Alexandrovich Kryukov 450
2 Kornfeld Eliyahu Peter 305
3 Ravi Bhavnani 200
4 Shemeemsha RA 160
0 Sergey Alexandrovich Kryukov 7,135
1 OriginalGriff 6,801
2 CPallini 5,350
3 George Jonsson 3,619
4 Gihan Liyanage 2,797


Advertise | Privacy | Mobile
Web04 | 2.8.140922.1 | Last Updated 7 Jul 2012
Copyright © CodeProject, 1999-2014
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