Success !!!

J

John Everett

Thanks to your suggestions...

I have fixed the problem.
I have reduced the search from 10 minutes to 5 seconds.

I combined the C++ STL map ability with a PERL trick.

1. I turned both dot lists in to strings for simplicity of comparison.
2. I loop through A_dots and associated the xyz_string with 1.

typedef map< char, int > char_int_map;
char_int_map search_map;

// while looping though A_dots
search_map ["33.224 31.332 11.332"] = 1


3. Then I loop through B_dots and test for the presence of the dot
in the map.

for ( int x=0; x<=100000; x++ )
{
if ( ! search_map[ B_dots[x] ] )
{
// record the dot since it is not in A_dots
}
}

Thanks,
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top