mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
Declare variable before empty for loop.
This commit is contained in:
parent
868be425a6
commit
67cd987efa
@ -264,6 +264,7 @@ int main() {
|
||||
|
||||
// *****NOTES*****:
|
||||
// Loops MUST always have a body. If no body is needed, do:
|
||||
int i;
|
||||
for (i = 0; i <= 5; i++) {
|
||||
; // use semicolon to act as the body (null statement)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user