Click here to Skip to main content
15,883,903 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
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
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
[no name] 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
Sergey Alexandrovich Kryukov 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

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900