Thread: using structures

  1. #1
    Registered User
    Join Date
    Jun 2002
    Posts
    3

    using structures

    I am using win me and borland c++ v5.02 starter kit.
    My question. I need to write a database for fishing, and want to use a structure for the data, a group of structures for the body of water and a group of body of water structures for the whole thing. I just need help to get started. Could some one point me in the right direction to get started? Any help would be appreciated. Thank you.

  2. #2
    I'm sorry, but I only have a foggy idea on what exactly you want to do.

    Is your game going to be like a fishing game? If so, is it going to be a overhead or like a 3rd person behind-the-back thingy (which if you knew how to program that, something as simple as stuctures wouldn't be hard for you ). Or is it going to be text based?

    And what are you planning to do with these structures?

  3. #3
    Registered User
    Join Date
    May 2002
    Posts
    178
    do you mean something like

    Code:
    struct lakes{
    char name[80];
    int size,  acres,  depth;
    };
    
    struct lures{
    char name[80];
    int depth, durability,  floatornot;
    };
    
    struct poles{
    char name[80];
    int length, string, reel;
    };
    
    etc etc
    Oi Oi Oi!!!!

  4. #4
    Registered User
    Join Date
    Jun 2002
    Posts
    3
    what i am trying to do is a database program, not a game. I hope to use the following for the trip:
    struct trip{temp()
    bait()
    ...
    }

    the following for the lake:
    struct lake{ series of trip struct s to be determined by user
    when program runnnning}

    I am not sure if need to have a total struct for the whole thing.

    Once i get it set up, i should be able to get the thing written.
    Last edited by miked45419; 06-10-2002 at 01:25 PM.

  5. #5
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >Once i get it set up, i should be able to get the thing written.
    That's the trick, isn't it? First, organize the data that you want to include and make sure that it's all there and will do what you want it to. This is before writing any code by the way. Once you have your data organized, place it in logical groups, these will become the data members of each structure. That's how you build structures and logical programs.

    -Prelude
    My best code is written with the delete key.

  6. #6
    Registered User
    Join Date
    Sep 2001
    Posts
    305
    there was this program that let you set up your program with functions, classes, etc...

  7. #7
    Registered User
    Join Date
    Jun 2002
    Posts
    3
    thanks for the info. and it just hit me like a 2x4 across the head, what i need to do.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 07-11-2008, 07:39 AM
  2. Structures, passing array of structures to function
    By saahmed in forum C Programming
    Replies: 10
    Last Post: 04-05-2006, 11:06 PM
  3. Input output with structures
    By barim in forum C Programming
    Replies: 10
    Last Post: 04-27-2004, 08:00 PM
  4. pointers to arrays of structures
    By terryrmcgowan in forum C Programming
    Replies: 1
    Last Post: 06-25-2003, 09:04 AM
  5. Methods for Sorting Structures by Element...
    By Sebastiani in forum C Programming
    Replies: 9
    Last Post: 09-14-2001, 12:59 PM