mirror of
https://github.com/krahets/hello-algo.git
synced 2025-01-23 22:40:25 +08:00
add initialization of C++ arrays
This commit is contained in:
parent
58319bd831
commit
45d2934386
@ -57,7 +57,11 @@ comments: true
|
||||
=== "C++"
|
||||
|
||||
```cpp title=""
|
||||
|
||||
/* 使用多种「基本数据类型」来初始化「数组」 */
|
||||
int numbers[5] = {0};
|
||||
float decimals[5] = {0};
|
||||
char characters[5] = {'0','0','0','0','0'};
|
||||
bool booleans[5] = {0};
|
||||
```
|
||||
|
||||
=== "Python"
|
||||
|
Loading…
Reference in New Issue
Block a user