06-07-2006, 07:20 AM | #11 |
20th Level Warrior
Join Date: December 28, 2003
Location: Kentucky
Age: 38
Posts: 2,820
|
...You're right...just looked it up, and I'm hosed. I'll update when I figure something out...
Incidentally, doing it my way would probably require more RAM than anyone on this forum has. [ 06-07-2006, 07:42 AM: Message edited by: Ilander ]
__________________
Is that what you really want to say? |
06-07-2006, 08:10 PM | #12 |
Takhisis Follower
Join Date: April 30, 2001
Location: szép Magyarország (well not right now)
Posts: 5,089
|
lol@ a 9d array. You only need 1d cos remember you can use the index and the value at each index to represent things. E.g. the array index reps the stat name and the value reps the stat value.
__________________
Too set in his ways to ever relate If he could set that aside, there'd be heaven to pay But weathered and aged, time swept him to grave Love conquers all? Damn, I'd say that area's gray |
06-07-2006, 10:11 PM | #13 |
20th Level Warrior
Join Date: December 28, 2003
Location: Kentucky
Age: 38
Posts: 2,820
|
...well crap, I could just use nine, 1-d arrays, couldn't I? It'd be less efficient than "data structures" I guess, but I still haven't looked those up.
__________________
Is that what you really want to say? |
06-08-2006, 06:51 AM | #14 |
Harper
Join Date: October 2, 2001
Location: Aberdeen, Scotland
Age: 42
Posts: 4,774
|
You could. Or you could use 1 2D array, and use the first dimension to seperate characters, and the second dimension to seperate stats within a character.
But data structures are powerful and you should learn to use them. Define one as: code:struct MyStruct{[/QUOTE], then declare a variable of type MyStruct: |
06-08-2006, 10:18 AM | #15 |
Takhisis Follower
Join Date: April 30, 2001
Location: szép Magyarország (well not right now)
Posts: 5,089
|
you should learn how to use the standard template library vectors, lists and maps. Maps are the only tricky ones to use. The main difference is that they can change size at run-time whereas arrays can't.
e.g. a vector of ints: code:#include <vector>[/QUOTE]can't remember other operations but I think you can erase like:
__________________
Too set in his ways to ever relate If he could set that aside, there'd be heaven to pay But weathered and aged, time swept him to grave Love conquers all? Damn, I'd say that area's gray |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Programmers/Developers | SilentThief | Dungeon Craft - RPG Game Maker | 20 | 06-24-2007 03:34 AM |
OTS: Hackers and Programmers Please help | Loumistro | Wizards & Warriors Forum | 4 | 01-20-2004 12:25 PM |
Any Fellow Programmers might enjoy this | harleyquinn | General Conversation Archives (11/2000 - 01/2005) | 15 | 02-07-2003 10:22 AM |