Question

Here is an example operation of the completed program: Please enter a string: the weather is great! The dash-version of yourYou should design first. You can have more functions, but you must have at least the three below with the EXACT function prot

#include <iostream>
  #include <string>
  using namespace std;
  
  void get_user_string(string *);
  string convert_to_dash(String* );
  int_search_and_replace(char, string, string &);
  
   int main (){

   string s;

   cout << "Enter a string:" << endl;
   get_user_string(&s);

       string dash_version = convert_to_dash(&s)

   if ( dash_version != 32){
   &s.push_back('-');
   }

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 #include <iostream> #include <string> using namespace std; void g

void get_user_string(string *a) { getline(cin, *a); نها 24 25 26 27 28 29 30 string convert_to_dash(string *b){ //here add th

#output:

user@user-Latitude - 3490:-/Desktop$ g++ 1.cpp user@user-Latitude - 3490 :-/Desktop$ ./a.out Enter a string: the whether is g

#if you have any doubt or more information needed comment below..i will respond as possible as soon..thanks.

Add a comment
Know the answer?
Add Answer to:
#include <iostream>   #include <string>   using namespace std;      void get_user_string(string *);   string convert_to_dash(String* );   int_search_and_replace(char, string,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT