#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 |
Difference between pass by value and pass by reference?
What is main function in c++ with example?
what is object?
Can member data be public?
What is static class data?
What language is a dll written in?
What is the topic of the C++ FAQ list?
What is guard code in c++?
#include<iostream.h> void main() { class x { public: int func(int) { cout<<"cool"; return 1; } } }
How many keywords are used in c++?
What is Name Decoration?
How do you compile the source code with your compiler?