Static class member

xiaoxiao2021-03-06  89

#include

Using namespace std;

class Account {private: static double _interestRate; double _amount; string _owner; public: static void raiseInterest (double incr); static double interest () {return _interestRate;} double amount () {return _amount;}};

Double Account :: _ Interestrate;

Inline Void Account :: RaiseInterest (Double INCR) {_INTERESTRATE = InCr;

Void main () {double (* ptr_temp) () = & access :: interest;}

转载请注明原文地址:https://www.9cbs.com/read-96593.html

New Post(0)