Re: Array finding(only for Good Ones)

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



a single line looks like this:

1 050801 060001 060006 6 16593 9 74000 1 1 4 1
439007 110705 199 1 43769 36 1 0 1 1 0600 31 1991
1 0 100

they're not tabulated, the field sizes are constant for each field.

These files are not so big, something like 1Mb in size.

The master tables sizes range from 1000 to 2000000 rows each. They have
Mystruct data type.


--
Rick


"Igor Tandetnik" wrote:

> Rick <Rick@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> > Suppose I have a structure as:
> >
> > struct Mystruct
> > {
> > int MyID;
> > char* MyStringData;
> > };
> >
> > Mystruct * pMystruct = new Mystruct [2000000];
> >
> >
> > Note: after loading data into pMystruct, pMystruct[]. MyStringData
> > has a size of 35;
> >
> > I need to convert a field named MyID from a text file(huge) into its
> > corresponding MyStringData value.
> >
> > Which is the fastest way to search MyID and convert it into
> > MyStringData value?
> > Note: Some of MyIDs may be missing in pMystruct. So I can't expect
> > continuos increasing in MyIDs.
>
> What does the text file look like? Where do MyIDs come from?
> --
> With best wishes,
> Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925
>
>
>
.



Relevant Pages

  • Re: Array finding(only for Good Ones)
    ... > I need to convert a field named MyID from a text fileinto its ... > corresponding MyStringData value. ... Some of MyIDs may be missing in pMystruct. ...
    (microsoft.public.vc.language)
  • RE: Array finding(only for Good Ones)
    ... You can't create a massive array and load the whole file into memory. ... are limitations (stack space, pysical memory, etc). ... > Which is the fastest way to search MyID and convert it into MyStringData ... Some of MyIDs may be missing in pMystruct. ...
    (microsoft.public.vc.language)