Skip to content

Commit ee78596

Browse files
authored
Merge pull request #148 from per1234/calculate-element-size
Use best practices for determining the size of an array element
2 parents 764d612 + 818ad02 commit ee78596

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Language/Variables/Utilities/sizeof.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void loop() {
6969

7070
[source,arduino]
7171
----
72-
for (i = 0; i < (sizeof(myInts)/sizeof(int)); i++) {
72+
for (i = 0; i < (sizeof(myInts)/sizeof(myInts[0])); i++) {
7373
// myInts[i] 가지고 무언가를 함
7474
}
7575
----

0 commit comments

Comments
 (0)