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

[Term Entry] C++ vector .back() #5014

Closed
wants to merge 5 commits into from
Closed

[Term Entry] C++ vector .back() #5014

wants to merge 5 commits into from

Conversation

SaviDahegaonkar
Copy link
Contributor

@SaviDahegaonkar SaviDahegaonkar commented Aug 9, 2024

Description

Issue Solved

Closes #4984

Type of Change

  • Adding a new entry

Checklist

  • All writings are my own.
  • My entry follows the Codecademy Docs style guide.
  • My changes generate no new warnings.
  • I have performed a self-review of my own writing and code.
  • I have checked my entry and corrected any misspellings.
  • I have made corresponding changes to the documentation if needed.
  • I have confirmed my changes are not being pushed from my forked main branch.
  • I have confirmed that I'm pushing from a new branch named after the changes I'm making.
  • I have linked any issues that are relevant to this PR in the Issues Solved section.

@avdhoottt avdhoottt self-assigned this Aug 9, 2024
@avdhoottt avdhoottt added c++ C++ entries new entry New entry or entries status: under review Issue or PR is currently being reviewed labels Aug 9, 2024
Copy link
Collaborator

@avdhoottt avdhoottt left a 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!!

content/cpp/concepts/vectors/terms/back/back.md Outdated Show resolved Hide resolved
content/cpp/concepts/vectors/terms/back/back.md Outdated Show resolved Hide resolved
content/cpp/concepts/vectors/terms/back/back.md Outdated Show resolved Hide resolved
```
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.
Copy link
Collaborator

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.
Copy link
Collaborator

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.

@SaviDahegaonkar
Copy link
Contributor Author

Hello @avdhoottt, Sorry for the late response
I have made the changes :)

Thanks,
Savi

@Radhika-okhade Radhika-okhade added the invalid This doesn't seem right; not eligible for Hacktoberfest label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ C++ entries invalid This doesn't seem right; not eligible for Hacktoberfest new entry New entry or entries status: review 1️⃣ completed status: waiting for author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Term Entry] C++ vector .back()
3 participants