Thread: help where to start

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    5

    help where to start

    The question:

    Write a function count(number, array, length) that counts the number of times number appears in array. The array has length elements. The function should be recursive. Write a test program to go with the function.

    Ok my problem is I don't even know where to start at on this problem. I don't want someone to write the code for me I just need a push in the write direction.

    TIA

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Define the array, populate it with data, and get used to looping through it.

    Once you've done that you can start on your count function.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946

    Re: help where to start

    Originally posted by teknikal
    The function should be recursive.
    TIA
    why? (other than thats what the assignment says), i see no reason to do this this way.
    hello, internet!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 09:35 AM
  2. Adventures in labyrinth generation.
    By guesst in forum Game Programming
    Replies: 8
    Last Post: 10-12-2008, 01:30 PM
  3. C++ gui for windows where to start
    By prixone in forum Windows Programming
    Replies: 2
    Last Post: 12-16-2006, 11:48 PM
  4. GNOME Desktop won't start (Mandriva)
    By psychopath in forum Tech Board
    Replies: 10
    Last Post: 07-19-2006, 01:21 PM
  5. Start bar color in WinXP
    By confuted in forum Tech Board
    Replies: 4
    Last Post: 05-03-2003, 06:18 AM