ScholarMatic | 24/7 Homework Help

ScholarMatic Will Help You Write Your Essays and Term Papers

Answered » You can buy a ready-made answer or pick a professional tutor to order an original one.

Returning Individual CSV Values* Write a function named next String that will return a single ‘ value ‘ ( i. substring ) from a Comma Sepa – rated…

by | Nov 28, 2023 | engineering

This is a C++ problem. Please give full explanations and code in details. Thanks.

  • Attachment 1
  • Attachment 2

1 ) . Returning Individual CSV Values*Write a function named next String that will return a single ‘ value ‘ ( i.e. substring ) from a Comma Sepa -rated Value " string . Your function will take two arguments : a string variable containing a comma separatedlist of values , and an integer containing the starting index ; your function should return a single string objectwith the value that starts at that index and ends right before the next comma’ ,’ ( do not include the comma inthe returned string ! ) :`string nextString ( string str , int startIndex ) ;If , however , the start index is after the last comma in the string , then the function should return the value start -ing at that index and continuing to the end of the string .For example ,cout < < next String ( " my , cat , ate , my , homework " , 3 ) ;will printcatandcout < < nextString ( " my , cat , ate , my , homework " , 8 ) ;will printteandcout < < nextString ( " my , cat , ate , my , homework " , 18 ) ;will printworkWhen you have written your function , then write a short test program that will take in a simple comma sepa -rated string using getline :"getline ( cin , somestring )and output values in the string using the next String function .2 ) . Split*Now , extend your test program by adding a second function named sp 1 it that will identify all the individualvalues in a comma separated value string and return them in an array of string objects :"int split ( string str , string a [ ] , int maxsize ) ;Your function will take three arguments : a comma separated value string str , an array a of string objects .and the maximum size of the array . You must use the next String function from Stretch Problem ( 1 ) toobtain each value in the string and store it in the array starting , with the first element . Return the total numberof values stored in the array .For example :"string varray [ VALUES ] ;int ent = split (" my , cat , ate , my , homework " , varray , VALUES ) ;Forl int 1 = 0 ; i<ont ; it + )cout < < Varray [ 1 ]`< < endl ;

ScholarMatic: Explanation & Answer

Your ready answer from a verified tutor is just a click away for as little as $14.99


  

Click Order Now to get 100% Original Answer Customized to your instructions!

HOME TO CERTIFIED WRITERS

Why Place An Order With Us?

  • Certified Editors
  • 24/7 Customer Support
  • Profesional Research
  • Easy to Use System Interface
  • Student Friendly Pricing

Have a similar question?

PLAGIRAISM FREE PAPERS

All papers we provide are well-researched, properly formatted and cited.

TOP QUALITY

All papers we provide are well-researched, properly formatted and cited.

HIGHLY SECURED

All papers we provide are well-researched, properly formatted and cited.

ScholarMatic: Get Started

Assignment Writing Service

Feel safe and secure when placing an order on our portal!
Fruitful cooperation begins with solid guarantees, and we are professional enough to promise perfect results. Let’s get it started!