Please help me
what should be the size of a class,if it contains data member of int and float,
a function,when we crete an object?
For example
[CODE=cpp]class X
{
int a ;
float b;
public:
void getdata(int x,float y)
{
a = x;
b = y;
}
};
int main()
{
X p;
sizeof(p);
}[/CODE]
what should be the size of a class,if it contains data member of int and float,
a function,when we crete an object?
For example
[CODE=cpp]class X
{
int a ;
float b;
public:
void getdata(int x,float y)
{
a = x;
b = y;
}
};
int main()
{
X p;
sizeof(p);
}[/CODE]
Comment