Enter your Sign on user name and password.

Forgot password?
  • Follow us on:
Loading video...
Text Comments (2)

1 answer

Last reply by: Alvin Sylvain
Fri Jun 13, 2014 12:30 PM

Post by Kitt Parker on June 12 at 12:48:09 PM

Had a clarification question on one of the functions.  Great videos by the way, wish more people took this approach.  A lot of distance classes involve the teacher throwing a book and some written assignments your way and politically saying "figure it out, lol."  

1.) the getline method reads up to the delimiter and stops correct?

I.E. This | is a | Test

would only catch "This "    ?  Pipe is the delimiter.  To catch everything in an array, we would have to loop it correct?


With the following function.

int get_int(istream &s, char delimiter) {
string buffer;
getline (s, buffer, delimiter);
stringstream ss(buffer);
int rtn;
ss >> rtn;
return rtn;
}

Review Using Real Code

Review Using Real Code

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.