how do u initialize the constant variables
Answer Posted / keshav.gadde
class sam
{
const int x;
public:
sam(int i):x(i)
{
cout<<i<<endl;
}
};
int _tmain(int argc, _TCHAR* argv[])
{
sam s(10);
return 0;
}
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is overloading in oop?
What is the oops and benefits of oops programming?
What is polymorphism and types?
What is coupling in oop?
What is the difference between abstraction and polymorphism?
what are the realtime excercises in C++?
What is object in oop?
What is static in oop?
any one please tell me the purpose of operator overloading
Can you explain polymorphism?
What are the features of oop?
Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?
How to hide the base class functionality in Inheritance?
2. Give the different notations for the class.\
Can we create object of interface?