1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
BaLLatris [955]
3 years ago
6

In C++ Programming:Given the following header:vector split(string target, string delimiter);

Computers and Technology
1 answer:
joja [24]3 years ago
5 0

Answer:

See explaination

Explanation:

#include <iostream>

#include <string>

#include <vector>

using namespace std;

vector<string> split(string, string);

int main()

{

vector<string> splitedStr;

string data;

string delimiter;

cout << "Enter string to split:" << endl;

getline(cin,data);

cout << "Enter delimiter string:" << endl;

getline(cin,delimiter);

splitedStr = split(data,delimiter);

cout << "\n";

cout << "The substrings are: ";

for(int i = 0; i < splitedStr.size(); i++)

cout << "\"" << splitedStr[i] << "\"" << ",";

cout << endl << endl;

cin >> data;

return 0;

}

vector<string> split(string target, string delimiter)

{

unsigned first = 0;

unsigned last;

vector<string> subStr;

while((last = target.find(delimiter, first)) != string::npos)

{

subStr.push_back(target.substr(first, last-first));

first = last + delimiter.length();

}

subStr.push_back(target.substr(first));

return subStr;

You might be interested in
1. Reference initials are always typed on a business letter.
solniwko [45]

Answer:

1. true 2.false 3.a 4.d 5.c 6.d 7. true 8.true 9.true 10.true

Explanation:

5 0
4 years ago
Write a function using statements called Print Reportl) which will take no float
Sedbober [7]

Answer:

the answer is going to be district b

5 0
3 years ago
What is the maximum number of communication paths for a team of twenty people.
Aneli [31]

Answer:

Communication path basically define the path in which the information and messages can be exchange by using the efficient communication path.

There are simple formula for calculating the total number of communication channel that is :

 =\frac{n(n-1)}{2}

Where, n is the number of stack holder.

Now, the maximum number of communication paths for a team of twenty people can be calculated as:

n=20  

=\frac{20(20-1)}{2} = 190

Therefore, 190 is the total number of communication path.

3 0
3 years ago
What types of items can tab be used to complete once you start typing the entities' name?
White raven [17]
The answer to this question is <span>file, command, or directory names
File is the part of the program that could be used to store various information. The command is part of the program that give abilities for user to run a certain program within the system operation. Directory names will create some sort and arrangement on collection of files</span>
3 0
3 years ago
Which language would you use to create scripts that send data to a web server?
bonufazy [111]

Which language would you use to create scripts that send data to a web server?

A. HTML

<u>B. ASP</u>

C. SGML

D. CSS

5 0
4 years ago
Read 2 more answers
Other questions:
  • Which of the following has the responsibility of offering instruction on intrusion detection systems and intrusion prevention sy
    11·1 answer
  • If parties in a contract are not _______, the contract can be canceled.
    7·1 answer
  • A field that will always have a unique value is
    15·2 answers
  • What technology will examine the current state of a network device before allowing it can to connect to the network and force an
    7·1 answer
  • The filter feature in excel allows you to look at what Data?
    7·1 answer
  • Do a comment if u hate me.or think im d.U.m b. add a answer if u dont care. thank all the asnwers or report for saying i dont ex
    9·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    5·1 answer
  • Imagine that you are in the market for a digital camera. Would it be better for you to purchase a high-quality digital camera or
    7·1 answer
  • How do even do anything on Rblx Creator?? Will give branliest for whoever gives me the most info.
    13·1 answer
  • A _____ shows how data moves through an information system but does not show program logic or processing steps.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!