Project database

This is a discussion on Project database within the C++ Programming forums, part of the General Programming Boards category; I was wondering, because i've thought about this for awhile, how to store a string, with a set of 5 ...

  1. #1
    Registered User mdshort's Avatar
    Join Date
    Dec 2003
    Posts
    6

    Question Project database

    I was wondering, because i've thought about this for awhile, how to store a string, with a set of 5 strings. Ok that sounds a bit confusing here is a graphic.
    Im going to use a structure for it, but here is what I wanted.
    database-
    -------------character- (names)
    --------------------------attacks-
    Im sure theres going to be an array somewhere here.

    PS: Give me a break im new to this.

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    One solution is an STL container.

    Kuphryn

  3. #3
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    So your character will be one string, and it will contain 5 strings?

    There's plenty of ways...
    Code:
    class Character
    {
    public:
    //...
    
    private:
    char* attacks[5];
    
    
    }
    //...
    Character chars[5];
    Probably not the best way...Like kuphryn said, using stl containers would also work...It really depends on what you are doing...
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  4. #4
    Registered User mdshort's Avatar
    Join Date
    Dec 2003
    Posts
    6

    Thanks for the help.

    Ill try the STL, then i'll try your idea. Thanks for the help.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What database technology would best suit my project ?
    By Desolation in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 04-02-2009, 10:42 AM
  2. Problem Displaying a Struct
    By rockstarpirate in forum C++ Programming
    Replies: 16
    Last Post: 05-05-2008, 10:05 AM
  3. Game Independent Anti-cheat Project Needs Programmers
    By GIA Project Lea in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 09-15-2005, 08:41 PM
  4. Database project proposal
    By MPSoutine in forum Windows Programming
    Replies: 1
    Last Post: 12-22-2003, 12:50 PM

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