This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ccs5 支持几种 结构体初始化 方式



对结构体

struct a {

int b;

int c;

};

有几种初始化方式:

struct a a1 = {
 .b = 1,
 .c = 2
};
或者
struct a a1 = {
 b:1,
 c:2
};
或者
struct a a1 = { 1, 2};

我试了前两种,都报错。是不是哪里写得不对