正如我们所知道的那样,结构的内存在其变量被定义时(或者在创建实例时)被分配。 现在 struct Programmer {
int skills;
int problemSolved;
};
int main(){
Programmer me;//Here the memory will be allocated but in what
//format(discret
我们知道,我们只能将一个结构对象分配给另一个具有相同类型的结构对象,但为什么我们不能将一个A型结构对象赋值给另一个B型结构对象? 这里, struct typeA{
int inA1;
int inA2;
};
struct typeB{
int inB1;
int inB2;
};
int main(){
typeA varA;