C structrue synax

struct person {
  int no;
  int age;
};

struct person verbose() {
  struct person yu = { .no = 1, .age = 20 };
  struct person xiao = { .age = 20, .no = 8 };
  return (struct person) { .no = 2, .age = 30 };
}

struct person succinct() {
  struct person yu = { 7, 10};
  return (struct person) { 1, 20 };
}

int main(int argc, const char *argv[]) {
  return 0;
}
 

你可能感兴趣的:(C++,c,C#)