40

I want to create a structure in C with initial values like:

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

I know the above is not possible, is there any other way to do this?

chqrlie
  • 114,102
  • 10
  • 108
  • 170
Layla
  • 4,914
  • 15
  • 50
  • 64

0 Answers0