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 |
Which is the only operator in C++ which can be overloaded but NOT inherited?
What is abstraction example?
Generally, in all C++ programs, texts are in white colour. Can we change the colour of the text(either input or output or both)? If so, help me out.
What is sub classing in c++?
what is the difference b/w abstract and interface?
2 Answers Merrill Lynch, Schneider, Scio Healthcare,
how to tackle technical questions
features of OOPS
22 Answers Ness Technologies, Satyam,
What is the difference between XML Web Services using ASMX and .NET Remoting using SOAP?
What is polymorphism used for?
What are the data types in oop?
• What are the desirable attributes for memory managment?
Iam doing my project on instant messaging , if you any new ideas regarding this project ,please suggest it?