Sorry for spamming. I posted this in the Lounge on accident:
Basically I want to return a string in the form of *location and put into some sort of variable...
Here's my class and declaration of items_database
class DB_Items
{
public:
int number;
char *location;
};
DB_Items items_database[3];
Here's part of the Database function:
char *return_string DataBase(int look_up_type, int look_up_category,int index)
{
for (int item_search=0; item_search<=3; item_search++)
{
if (items_database[item_search].number==index)
{
return (items_database[item_search].location);
}
}
}
So, I am just trying to return items_database[item_search].location
Am I making any sense?
"All you touch and all you see is all your life will ever be --Pink Floyd
Need help? Well, go
FAQ yourself.
Edited by - Nazrix on January 21, 2001 3:19:48 PM