subject

Just like the > > operator that reads c-strings, your > > operator should skip any leading spaces and then read characters into the string up to the first whitespace character. for reasons of convenience, we will impose a limit of 127 on the number of characters this function will read. this is so you can temporarily read into a non-dynamic array and then copy what you need into your data member, which will be a dynamic array. note that this does not mean that all mystrings will always have a maximum of 127 characters. for example, you might get a mystring with more than 127 characters by using the mystring constructor or by concatenating two mystrings. hint: don't try to read character by character in a loop. use the extraction operator to do the reading of the input into a non-dynamic array, then use strcpy() to copy it into your data member. make sure to allocate the correct amount of memory. hint: if you use the extraction operator as suggested above, you will not have to skip leading whitespace, because the extraction operator does that for you.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 23:30
Which of the following is not a symptom of chronic fatigue syndrome
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
What is the digital revolution and how did it change society? what are the benefits of digital media?
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
Experimental data that is expressed using numbers is said to be
Answers: 1
question
Computers and Technology, 24.06.2019 12:00
How can we take picture in this app
Answers: 1
You know the right answer?
Just like the > > operator that reads c-strings, your > > operator should skip any lea...
Questions
question
Mathematics, 21.12.2020 01:00
question
Mathematics, 21.12.2020 01:00
question
Engineering, 21.12.2020 01:00
Questions on the website: 13722367