I have a class and want to create a const int variable but the value for the variable is not available to me in constructor of the class.
In initialization method of the
A small example:
class A { public: A():a(initial_value_of_a()) {} private: const int a; int initial_value_of_a() { return 5; /* some computation here */ }; };