40

我想在 C 中创建一个具有初始值的结构,例如:

typedef struct {
    int id = 0;
    char *name = "none";
} employee;

我知道以上是不可能的,有没有其他方法可以做到这一点?

4

0 回答 0