Difference between Constructors and static constructors?
Answer Posted / venkataramakrishna. danduri
The main thing is the constructoe can't be Static, int or
any other data type. It will simpley throws a error
messgae. It is just to confuse the candidate.
Example:
class A
{
public:
static A(){ a = 0;}
int a;
};
void main()
{
A a;
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How do you sort a sort function in c++ to sort in descending order?
What is an html tag?
What is pointer to member?
What does asterisk mean in c++?
What is the best free c++ compiler for windows?
What is auto type c++?
What is the purpose of templates in c++?
Explain the concept of dynamic allocation of memory?
Is there a sort function in c++?
What is iomanip c++?
Why is main function important?
What is setf in c++?
What do you mean by translation unit?
What is token c++?
Write about a nested class and mention its use?