همانند indhold در خارج از کلاس قالب struct را تعریف کنید:


struct indhold
{
int tiNumber;
int tyveNumber;
};

struct indhold_2
{
coinType type;
int antal;
};

class Automat
{
public:

void addCoins(coinType,int antal);
void print();
void veksel(seddelType);

private:

map <coinType, indhold> indholdMap;

indhold_2 saldo;

indhold CoinNumbers;
};

ضمنا شما در هیج کجای برنامه به saldo مقدار نداده اید در حالی که در map آن را insert کرده اید.