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.

TMS320F28035: 在程序中的结构体定义中直接初始化变量有警告提示使用C++11但在编译器中无法更改C++03为C++11

Part Number: TMS320F28035
Other Parts Discussed in Thread: C2000WARE

		 struct CANMBOXn_DATA
		 {
			 union CANMSMID u32MID;
			 Uint16 Dlc = 8;
			 union CANMDR unMDR;
		 };

仿真查看

仿真时可以看到在 结构体定义初始化为7的时候不初始化定义的结构体 Dlc的值默认是7

在实际工程中直接使用会有问题么?