Write a sequence of statements that finds the first comma in the string line, and assigns to the variable clause the portion of line up to, but not including the comma. You may assume that an int variable pos, as well as the variables line and clause, have already been declared.
.
.
Click on the title for the solution
.
.
.
Click on the title for the solution
.
.
This is the answer:
:
pos=line.find(",");
clause=line.substr(0,pos);
Comments
Post a Comment