Thread: Any way to get an array to search itself

  1. #1
    Unregistered
    Guest

    Any way to get an array to search itself

    for a duplicate number in it? Or Using an 2nd Array to find if there are any duplicates numbers in the 1st arrays?

  2. #2
    Unregistered
    Guest
    search itself? No. But can you create a function to search an array for duplicate values? sure.

    Select each value in the array in turn and store it in a free standing variable. then compare that value to every other value in the array. Hint: nested loops.

  3. #3
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    An array is just a datastructure.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  2. Template Array Class
    By hpy_gilmore8 in forum C++ Programming
    Replies: 15
    Last Post: 04-11-2004, 11:15 PM
  3. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  4. search array program
    By z.tron in forum C++ Programming
    Replies: 3
    Last Post: 11-15-2002, 07:33 AM
  5. binary search in an array
    By brianptodd in forum C++ Programming
    Replies: 4
    Last Post: 11-12-2002, 02:05 PM