C struct

struct Distance{
    int feet;
    float inch;
};

int main() {
    structure Distance d1, d2;
}

is equivalent to

typedef struct Distance{
    int feet;
    float inch;
} distances;

int main() {
    distances d1, d2;
}

猜你喜欢

转载自www.cnblogs.com/anyu686/p/12695486.html