How do you initialize a class member,
class x {
const int i;
};
Answer Posted / guest
x()
{i=10;
}
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Can static member variables be private?
Can we use this pointer inside static member function?
What is pointer to array in c++?
What is near, far and huge pointers? How many bytes are occupied by them?
Which sort does c++ use?
Is c++ a good first language to learn?
What are the differences between malloc() and calloc()?
What do you mean by translation unit in c++?
Can a Structure contain a Pointer to itself?
What is c++ w3school?
How do you add an element to a set in c++?
What is functions syntax in c++?
You want to link a c++ program to c functions. How would you do it?
What is polymorphism in c++? Explain with an example?
What is c++ redistributable?