拜托,我正在寻求帮助,我已经绝望了。
这是我的代码:
#include <stdlib.h>
#include <stdio.h>
typedef struct {
int citatel, jmenovatel;
} Zlomek;
typedef struct {
Zlomek j, c;
} Slozeny;
int main()
{
Zlomek z1 = {2, 5}, z2 = {3, 7};
Slozeny slozenec = {z1, z2};
system("PAUSE");
return 0;
}
当我编译时,VS 只是抛出:错误 C2440: 'initializing' : cannot convert from 'Zlomek' to 'int'。有人帮我吗?