My code:
class Controller {
private:
class ControllerMetals {
private:
int m_size;
Metals * m_metals;
public:
ControllerMetals();
Metals & getMetals() const;
int getSize() const;
void setSize(int size) { m_size = size; }
void init();
void show();
void erase();
friend void Controller::start(ControllerMetals & c); // why don't work ?
};
private:
ControllerMetals * controlMetals;
public:
void start(ControllerMetals & c);
ControllerMetals * getControlMetals() const;
Controller();
};
I want to make a void start to have access private member in ControllerMetals class. Why friend statements don't work ?