how do u initialize the constant variables
Answer Posted / bibin joy
class A
{
const int mConstVal ;
A():mConstVal (10)
{
}
}
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Can we have inheritance without polymorphism?
How long to learn object oriented programming?
How does polymorphism work?
Why is it so that we can have virtual constructors but we cannot have virtual destructors?
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer
What is object and class in oops?
What is overriding in oop?
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
What are the 3 pillars of oop?
What makes a language oop?
What is the purpose of enum?
What is interface? When and where is it used?
write a program that takes input in digits and display the result in words from 1 to 1000
What is coupling in oop?
What are the three main types of variables?