0

enter image description here

I get this message and it just goes on and on for ages and I can't see why. It says there is a problem with the template usage maybe but I don't think I did something wrong:

using std::shared_ptr;
using std::set;

class User{
    set<CoinBalance> holdings;
    ApiConnection api;

public:
    void newHolding(const shared_ptr<Coin>&, double amount = 0);
    void addToHolding(const shared_ptr<Coin>&, double amount = 0);
    void decreaseFromHolding(const shared_ptr<Coin>&, double amount = 0);

    double getHondingsUsdValue();
};

and this is how I used shared_ptr:

class CoinBalance {
    shared_ptr<Coin> coin;
    double amount;
};
Student
  • 805
  • 1
  • 8
  • 11
Dr. Prof. Patrick
  • 1,280
  • 2
  • 15
  • 27

2 Answers2

1

yes, you need to implement the < operator for CoinBalance

VinuT
  • 11
  • 1
0

I think you have to implement the operator '<' for class CoinBalance.

Stoica Mircea
  • 782
  • 10
  • 22