#include<iostream.h>
void main()
{
class x
{
public:
int func(int)
{
cout<<"cool";
return 1;
}
}
}
Answer / m.shanmuga sundaram,rjnsoftwar
An user defined data type should end with a semi colon
otherwise returns "error syntax error : missing ';'
before '}'"
#include<iostream.h>
void main()
{
class x
{
public:
int func(int)
{
cout<<"cool";
return 1;
}
} ; /*An user defined data type should end with a
semi colon*/
}
| Is This Answer Correct ? | 13 Yes | 7 No |
You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()
Describe the process of creation and destruction of a derived class object?
How do you add an element to a set in c++?
Is map sorted c++?
Will c++ be replaced?
Why is main an int?
What is a custom exception?
What is function prototyping?
What are the differences between malloc() and calloc()?
In which memory a class gets stored(in heap /in stack)? And why??
How do you know that your class needs a virtual destructor?
What is the Standard Template Library?