P.5 example read int array size mismatch (#1161)

Expand comment to clarify problem.
This commit is contained in:
nnaka 2018-03-11 04:13:55 -04:00 committed by Jonathan Wakely
parent b487f9790a
commit 9c4d4247b1

View File

@ -697,7 +697,7 @@ Or better still just use the type system and replace `Int` with `int32_t`.
void read(int* p, int n); // read max n integers into *p
int a[100];
read(a, 1000); // bad
read(a, 1000); // bad, off the end
better