In article <91ee4eb9-768d-4db2-99b2-a9132f6646a8
@z66g2000hsc.googlegroups.com>,
as****@gmail.com says...
hello guys
I need to modify the std::cin delim char from the default ' ' and '\n'
characters to ',' i know that i can edit the delim in the getline
command however i'd like to know if there's something build in with me
having to overload the std::cin operator
There are a couple of possibilities. The delimiters are defined by the
locale, so you can define a new locale with the delimiters of your
choice.
You can also create a filtering streambuf to transform the input into a
format that's easier to deal with (e.g. take the commas in the original
input and replace them with spaces so the rest of the code only sees the
spaces that the iostream expects to use as delimiters.
--
Later,
Jerry.
The universe is a figment of its own imagination.