Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page 41: %zu is a better format specifier for size_t than %zd #93

Closed
delan opened this issue Jan 3, 2020 · 1 comment
Closed

Page 41: %zu is a better format specifier for size_t than %zd #93

delan opened this issue Jan 3, 2020 · 1 comment

Comments

@delan
Copy link

@delan delan commented Jan 3, 2020

size_t is an unsigned type, so %zd would be misleading for many values:

#include <cstdint>
#include <cstdio>
int main() { printf("%zd", SIZE_MAX); }
@JLospinoso

This comment has been minimized.

Copy link
Owner

@JLospinoso JLospinoso commented Jan 9, 2020

Thanks @delan! This is a pretty major erratum. I've added a note for the first occurrence on Page 41, but it needs to be fixed all over the place.

JLospinoso added a commit that referenced this issue Jan 9, 2020
@JLospinoso JLospinoso closed this Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.