#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 |
What is a sequence in c++?
Is dev c++ a good compiler?
Write a program that will count the number of digits in an input integer up to value MAX_VALUE (2147483647). Thus, for an input of 5837 the output should be 4 digits Make sure that your program works for the numbers 0, 1, and 10. For the number 0, the output should be 1 digit
What about Virtual Destructor?
What is the most useful programming language?
What is the output of this prog. ? struct A { A(){ cout << \"A\"; } }; struct B { B(){ cout << \"B\"; } }; struct C { C(){ cout << \"C\"; } }; struct D { D(){ cout << \"D\"; } }; struct E : D { E(){ cout << \"E\"; } }; struct F : A, B { C c; D d; E e; F() : B(), A(),d(),c(),e() { cout << \"F\"; } };
what is the behaviour of C and C++ compiler for the below statements. int *p; p = malloc(100); Is the behaviour same ? or different ?
Write some differences between an external iterator and an internal iterator?
a class that maintains a pointer to an object that is programatically accessible through the public interface is known as?
Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;
Explain the concept of copy constructor?
Should I learn c or c++ or c#?