vorrei sapere di questa classe, trovata su internet, cosa significano alcune cose:codice:class Book { public: Book( const string& title ) : title_( title ) { n_++; } const string& title() const { return title_; } static int numberOfBooks() { return n_; } private: string title_; static int n_; };
costruttore book: perché il paramentro title dovrebbe essere una costante :master: ? Cosa vuol dire tutto il metodo title? Perché quei const di qua e di la?
Cosa ha di particolare un metodo statico?
Grazie e ciao![]()
![]()