I need to create an inventory system that can add delete and edit. For one player there can be as as many characters as the player wishes to create so for an example a player can have 5 different characters. I want the player to be able to run the program and choose add new character and then be able to type in the characters name and gender and then select the type of character which will have preset values for magical ability, strength, health and wealth. I then want the player to be able to edit the characters name, gender or type or delete that character.
so far this is what I have got and am completely stuck on where to go next.
ObjectArray::ObjectArray(void) :capacity(10), used(0)
a = new Character[capacity];
delete  a; //as we have used a dynamic array we have
// to do this to return memory to the free store
void ObjectArray::addElement(Character element)
a[used] = element;
Character& ObjectArray::operator(int index)
class Character //a record holding all the data on one character
string uniquename; //allows for a char called uniquename that can be up to 35 characters long
string sex; //allows for a char called sex that can be up to 6 characters long
string type; //allows for a char called type that can be up to 8 characters long
int magicalability; //holds the magicalability of the character
int strength; //holds the strength of the character
int health; //holds the health of the character
int wealth; //holds the wealth of the character
Character(string, string, string, int, int, int, int);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Character *a; //used for an array of Person objects
void addElement(Character element);
Character& operator(int index);
Any help will be much appreciated as to how to move on.
I can add say for example a menu system asking what they would like to do but have no clue how to implement the edit, add and delete function? I know at present it displays what I have typed in but I know this part is no good if I want to allow the user to change the data.