struct buf
{
int a;
buf(){
cout<<"in stuct default\n";
a = 3;
}
buf(int x) {
a = x;
cout<<"in stuct parameterizd\n";
}
};
class A
{
public:
struct buf o1(5);
A(){ }
};
int main()
{
A ob1;
}
Can anyone tell me whats wrong with this code.
I'm getting a compilation error as
sample.cpp:19: error: expected identifier before numeric constant
sample.cpp:19: error: expected â,â or â...â before numeric constant