Click here to Skip to main content
11,641,209 members (64,869 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
I have 5 text file. each record in each file contains two fields, city and salefigure.
i need create index in text file.
Posted 21-Nov-12 4:07am
Comments
richcb at 21-Nov-12 10:11am
   
Not a question. You need to provide code you have tried and ask a specific question to point out where you are stuck.
boyliberal2007 at 21-Nov-12 10:26am
   
I don't known about this problem? please help me
OriginalGriff at 21-Nov-12 10:26am
   
And? What is your problem? Where are you stuck?
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Use the "Improve question" widget to edit your question and provide better information.
Mathlab at 21-Nov-12 10:40am
   
Since I read both your question you need to create a simple hash function so you can do integer searches
Nelek at 21-Nov-12 17:34pm
   
Please don't think we can read minds or do astral projections to see your monitor. If you need help, the least you could do is to add some relevant code to your question or to explain your problem in such a way, that the users of CP can understand it. Otherwise, nobody will be able to help you.
what have you tried?[^]

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

According to Mathlab´s comment you can try to read all 5 text files to a hashtable/dictionary. Read them line by line, split each line into key and value and add them to the dictionary. The keys value has to be a list, because there may be more salesfigures for a city. Then write the dictionary to a text file.
  Permalink  
v3

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

  Print Answers RSS
0 Mika Wendelius 400
1 OriginalGriff 205
2 DamithSL 203
3 CPallini 185
4 Afzaal Ahmad Zeeshan 129
0 Mika Wendelius 400
1 OriginalGriff 205
2 DamithSL 203
3 CPallini 185
4 Afzaal Ahmad Zeeshan 129


Advertise | Privacy | Mobile
Web03 | 2.8.150731.1 | Last Updated 22 Nov 2012
Copyright © CodeProject, 1999-2015
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