how do u initialize the constant variables
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / bibin joy
class A
{
const int mConstVal ;
A():mConstVal (10)
{
}
}
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / yughandhar
as for my knowledge,the constant variables are intialised by
keyword called DEFINE
Eg:
#define pie=3.14
| Is This Answer Correct ? | 4 Yes | 7 No |
can you give the dynamic polymorphism types?
What is multilevel inheritance?
Name an advantage of array over linked list?
24 Answers GML, IBM, Software Solutions,
What is the use of fflush(stdin) in c++?
How do you achieve runtime polymorphism?
What is coupling in oop?
1. Define a class.
What is polymorphism in oops with example?
Can we define a class within the interface?
What is the difference between abstraction and polymorphism?
What is protected in oop?
What is polymorphism used for?