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
Write a single instruction that will store an EVEN random integer between 54 and 212 inclusive in the variable myran. (NOTE only generate EVEN random numbers)
What is abstraction in c++ with example?
What is the use of data hiding?
Is c++ double?
Write a short code using c++ to print out all odd number from 1 to 100 using a for loop
What is constant in c++ with example?
What is the type of 'this' pointer? When does it get created?
Does c++ have string data type?
what is Member Functions in Classes?
What is c++ w3school?
Discuss the possibilities related to the termination of a program before entering the mainq method?
What is difference between class and structure in c++?
What is c++ and its uses?
How do I get good at c++ programming?
Can c++ be faster than c?