How do you initialize a class member,
class x {
const int i;
};
Answer Posted / santosh patil
class members can be initialized directly like
class x{const int i=10;}
but its structures members tat cant be initialized lik above
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is using namespace std in c++?
Can I learn c++ as my first language?
Why do you use the namespace feature?
How is data hiding achieved in c++?
What is switch case in c++ syntax?
What is vector pair in c++?
Define virtual constructor.
What is a down cast?
What does flush do?
Will a C compiler always compile C++ code a) Yes b) No c) Only optimized compilers
What do you know about near, far and huge pointer?
What is difference between array and vector in c++?
Explain data encapsulation?
How do you declare A pointer to function which receives an int pointer and returns a float pointer
Why is c++ awesome?