add initialization of C++ arrays

This commit is contained in:
C_YouShao 2022-12-21 16:25:29 +08:00 committed by GitHub
parent 58319bd831
commit 45d2934386
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,11 @@ comments: true
=== "C++" === "C++"
```cpp title="" ```cpp title=""
/* 使用多种「基本数据类型」来初始化「数组」 */
int numbers[5] = {0};
float decimals[5] = {0};
char characters[5] = {'0','0','0','0','0'};
bool booleans[5] = {0};
``` ```
=== "Python" === "Python"