-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[Term Entry] C++ vector .back() #5014
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @SaviDahegaonkar, I have suggested some changes. Please make them!!
``` | ||
To use vectors, it is necessary to `#include` the `vector` library as the vector is a part of STL library. | ||
|
||
The below example shows the use of `.back()` method in c++ vectors, here `numbers` is a vector which has 5 elements in it and it displays the last element in the vector with the help of the `.back()` method, then the last element in the vector is modifies and the modified value is displayed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put this line after the Example
heading.
The last element in the vector after modification is: 80 | ||
``` | ||
|
||
This codebyte example shows that how a last element in the vector in accessed and modified using the `back()` method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add this after the Codebyte heading.
Co-authored-by: Avdhoot <[email protected]>
Co-authored-by: Avdhoot <[email protected]>
Changes done.
Hello @avdhoottt, Sorry for the late response Thanks, |
Description
Issue Solved
Closes #4984
Type of Change
Checklist
main
branch.Issues Solved
section.