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

ex13.44 about size and length function #813

Open
relaxcn opened this issue Nov 13, 2021 · 1 comment
Open

ex13.44 about size and length function #813

relaxcn opened this issue Nov 13, 2021 · 1 comment

Comments

@relaxcn
Copy link

relaxcn commented Nov 13, 2021

in the ex13_44_47.h, the size and length function is different.

size_t size() const { return end - elements; }
size_t length() const { return end - elements - 1; }

But this website says that they return the same value, they are synonyms.

@lvchong-del
Copy link

maybe minus the terminating null character '\0'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants