Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Why must getline() be used insteadof cin to get string input? Give an example of when you would need touse cin.ignore() in your code Strings
- Why must getline() be used insteadof cin to get string input?
- Give an example of when you would need touse cin.ignore() in your code
- Strings in C++ are mutable, this is different than in Javawhere strings were immutable. What do we mean by mutableversus immutable?
- Imagine your code had the following string variable init string message ="HH231JJ"; Write a for loop that uses the [ ]operator to change each 'H' character in the message string toa '#' character.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started