doc: update docs/cpp.md

This commit is contained in:
jaywcjlove 2024-10-28 19:19:04 +08:00
parent af2f380a18
commit 292551a8f2

View File

@ -177,7 +177,7 @@ marks[0] = 92;
marks[1] = 97;
marks[2] = 98;
// 定义和初始化
std::array<int, 3> = {92, 97, 98};
std::array<int, 3> marks = {92, 97, 98};
// 有空成员
std::array<int, 3> marks = {92, 97};
std::cout << marks[2]; // 输出: 0