Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Success !!!

Reply
Thread Tools

Success !!!

 
 
John Everett
Guest
Posts: n/a
 
      07-04-2003
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command of the English Language is very important to our professional success. MCSD 6 04-19-2009 06:43 AM
Command of the English Language is very important to our professional success. Microsoft Certification 2 03-10-2005 06:56 PM
Success at last with one minor problem. =?Utf-8?B?SmFjaw==?= Wireless Networking 1 02-22-2005 11:09 AM
A little success but still problems =?Utf-8?B?TTc2?= Wireless Networking 14 01-18-2005 12:36 AM
SUCCESS!!! =?Utf-8?B?U3RlcGhhbmll?= Wireless Networking 0 10-20-2004 08:11 PM



Advertisments