and how to use strtok() to parse it up in c++. i am planning on using getline(). thank you in advance
and how to use strtok() to parse it up in c++. i am planning on using getline(). thank you in advance
I Love Jesus
there are several versions of getline() depending on which type of string you are using as a buffer to hold the input. The one for c_style strings has the prototype:
streamName.getline(bufferName, maxSizeOfDesiredInput, terminatingChar)
where bufferName is a valid c_style string with adequate memory allocated for maximum size of desired input, which is obviously the second parameter. terminatingChar can be any valid char and defaults to new line char if you don't specify one.
I don't know the prototype for strtok() off the top of my head because I usually write my own parsing functions, glutton for punishment that I am.