Not sure where to start on this

This is a discussion on Not sure where to start on this within the C++ Programming forums, part of the General Programming Boards category; Hey all, I have a programming assignment that I'm not really sure where to start. A week ago for part1 ...

  1. #1
    Registered User axon's Avatar
    Join Date
    Feb 2003
    Posts
    2,572

    Not sure where to start on this

    Hey all, I have a programming assignment that I'm not really sure where to start. A week ago for part1 I had to write my own classes for the requirements, but now my professor said we HAVE to use his predesigned classes. His algo is way different than mine, and I'm lost.

    The program has to do the following. There are four inputs from the command line: number of rows, number of columns, number of people, and if random.

    The program is a i by j gridworld that is populated by N number of people. If the flags are not specified rows=5 cols=5 and N=5 and distribution is random. After making the grid, which I have managed to do so far, I have to spread the N number of people randomly throughout the grid. After this the program must do the following: print all members in district (i,j) (linear time), find x and display the district (constant time), and move x to a specified district (also constant time). The constant time is taken care of the doubly linked list and its implimentation.

    Now I'm stuck, I think that the next step would be to randomly distribute the members in lists. Each element of the gridarray would serve as a pointer to a list. Any hints on how I should proceed?

    thanks,

    axon
    Attached Files Attached Files

    some entropy with that sink? entropysink.com

    there are two cardinal sins from which all others spring: Impatience and Laziness. - franz kafka

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, 02: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, 02:21 PM
  5. Start bar color in WinXP
    By confuted in forum Tech Board
    Replies: 4
    Last Post: 05-03-2003, 07:18 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21