So I'm trying to make a store for a game, each object has 4 things; a name, a price, the stat that it improves (ej. Armor, Strength, etc.) and how much it improves it.
Example of a blade:
The super legendary blade, 10 (price), Strength, +12
So I've thought of creating 4 arrays, 2 that hold strings and 2 that hold integers; then I would have to somehow connect this 4 arrays so that is easy to show the store; meaning that I could do a simple function that says cout<<array_that_holds_all_arrays[i][j]; and the i and would be numbers created in a for loop so I just show all the store.
I hope you understand what I'm trying to explain; the problem is that I don't know hoe to do this array that holds arrays... maybe with a vector? I need help xD
Yeah, object oriented programming, I've jsut had a lot of problems with objects... I don't get why can't I declare a global object so that I can use it anywhere I want to... I always got this god damm out of scope error...
So if I do it this way, whn do I have to declare al the objects? and what is an explicit type?
And what am I supposed to write on getName()