My guess is that you just need a way to store a relationship between the price and a weapon. Use a map. If I were going to build a class for the weapons shop, I might use this constructor:
Code:
#include <string>
#include <vector>
#include <map>
#include <random>
using namespace std;
WeaponsShop(const int min = 200, const int max = 10000)
{
vector<string> weapons =
{
"banana bomb","grenade","bazooka","uzi","shotgun","air strike"
};
default_random_engine rng;
uniform_int_distribution<int> d(min, max);
for (string key : weapons)
{
shelf[key] = d(rng) / 10 * 10; // random price, truncated by 10 of whatever currency
}
}
Or a vector of pairs. That's a start.