Need help on getting characters from a string?

General Tech Learning Aids/Tools 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Learning Aids/Tools related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I'm currently in an Intro C++ clahref="https://forum.tuteehub.com/tag/s">shref="https://forum.tuteehub.com/tag/s">s, and I'm href="https://forum.tuteehub.com/tag/learning">learning about Stringhref="https://forum.tuteehub.com/tag/s">s and Member Functionhref="https://forum.tuteehub.com/tag/s">s of them. I have href="httphref="https://forum.tuteehub.com/tag/s">s://forum.tuteehub.com/tag/quehref="https://forum.tuteehub.com/tag/s">stionhref="https://forum.tuteehub.com/tag/s">s">quehref="https://forum.tuteehub.com/tag/s">stionhref="https://forum.tuteehub.com/tag/s">s that are like thihref="https://forum.tuteehub.com/tag/s">s:

Ahref="https://forum.tuteehub.com/tag/s">shref="https://forum.tuteehub.com/tag/s">sume that name ihref="https://forum.tuteehub.com/tag/s">s a variable of type href="https://forum.tuteehub.com/tag/s">string that hahref="https://forum.tuteehub.com/tag/s">s been ahref="https://forum.tuteehub.com/tag/s">shref="https://forum.tuteehub.com/tag/s">signed a value. Write an exprehref="https://forum.tuteehub.com/tag/s">shref="https://forum.tuteehub.com/tag/s">sion whohref="https://forum.tuteehub.com/tag/s">se value ihref="https://forum.tuteehub.com/tag/s">s a href="https://forum.tuteehub.com/tag/s">string containing the firhref="https://forum.tuteehub.com/tag/s">st character of the value of name . So if the value of name were "Smith" the exprehref="https://forum.tuteehub.com/tag/s">shref="https://forum.tuteehub.com/tag/s">sion'href="https://forum.tuteehub.com/tag/s">s value would be "S".

or

Ahref="https://forum.tuteehub.com/tag/s">shref="https://forum.tuteehub.com/tag/s">sume that name ihref="https://forum.tuteehub.com/tag/s">s a variable of type href="https://forum.tuteehub.com/tag/s">string that hahref="https://forum.tuteehub.com/tag/s">s been ahref="https://forum.tuteehub.com/tag/s">shref="https://forum.tuteehub.com/tag/s">signed a value. Write an exprehref="https://forum.tuteehub.com/tag/s">shref="https://forum.tuteehub.com/tag/s">sion whohref="https://forum.tuteehub.com/tag/s">se value ihref="https://forum.tuteehub.com/tag/s">s a href="https://forum.tuteehub.com/tag/s">string containing the lahref="https://forum.tuteehub.com/tag/s">st character of the value of name . So if the value of name were "Smith" the exprehref="https://forum.tuteehub.com/tag/s">shref="https://forum.tuteehub.com/tag/s">sion'href="https://forum.tuteehub.com/tag/s">s value would be "h".

or

Ahref="https://forum.tuteehub.com/tag/s">shref="https://forum.tuteehub.com/tag/s">sume that word ihref="https://forum.tuteehub.com/tag/s">s a variable of type href="https://forum.tuteehub.com/tag/s">string that hahref="https://forum.tuteehub.com/tag/s">s been ahref="https://forum.tuteehub.com/tag/s">shref="https://forum.tuteehub.com/tag/s">signed a value. Write an exprehref="https://forum.tuteehub.com/tag/s">shref="https://forum.tuteehub.com/tag/s">sion whohref="https://forum.tuteehub.com/tag/s">se value ihref="https://forum.tuteehub.com/tag/s">s a href="https://forum.tuteehub.com/tag/s">string conhref="https://forum.tuteehub.com/tag/s">sihref="https://forum.tuteehub.com/tag/s">sting of the lahref="https://forum.tuteehub.com/tag/s">st three characterhref="https://forum.tuteehub.com/tag/s">s of the value of word . So if the value of word were "biggehref="https://forum.tuteehub.com/tag/s">st" the exprehref="https://forum.tuteehub.com/tag/s">shref="https://forum.tuteehub.com/tag/s">sion'href="https://forum.tuteehub.com/tag/s">s value would be "ehref="https://forum.tuteehub.com/tag/s">st".

I know thinghref="https://forum.tuteehub.com/tag/s">s like name[0] and name[name.length() - 1], but I don't know how to turn thohref="https://forum.tuteehub.com/tag/s">se into a href="https://forum.tuteehub.com/tag/s">string in one exprehref="https://forum.tuteehub.com/tag/s">shref="https://forum.tuteehub.com/tag/s">sion. I've been looking for a table or lihref="https://forum.tuteehub.com/tag/s">st of member functionhref="https://forum.tuteehub.com/tag/s">s that can href="httphref="https://forum.tuteehub.com/tag/s">s://forum.tuteehub.com/tag/help">help me do thihref="https://forum.tuteehub.com/tag/s">s, but I'm href="https://forum.tuteehub.com/tag/s">stuck. Any directionhref="https://forum.tuteehub.com/tag/s">s or aid would be great. :D

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.