我正在对Arduino进行编程,我正在尝试重构代码
char variable1[10] = {'\0' };
char variable2[10] = {'\0' };
char variable3[10] = {'\0' };
到
struct set {
char variable1[10];
char variable2[10];
char variable3[10];
} mySet;
struct
但是,当我尝试通过运行以下代码来初始化上述成员时
mySet.variable1 = {'\0' };
// or
mySet.variable1 = '\0';
然后我收到以下错误:
expected constructor, destructor, or type conversion before '.' token
我如何/应该初始化和正确使用struct
?