class one {
public :
int a;
};
class two :public one{
public:
int d;
}
class test {
union{
one a;
};
};
int main(){
test obj;
obj.a.d=10;
printf("%d",a.d);
return 0;
}
My problem is i need to have a class object in an union,[since there is a rule that union...
hi
I am a new child for c programming, the need arised when
i tried to read a file using fgets into an chararray.
I need to transfer the value in the char array [which i know is a numeric value] into an int variable, since i need to convert that value read from file into ASCII, using...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.