On Sun, Aug 23, 2009 at 10:14 PM, Diederick C.
Niehorster
Oops, the situation is not as bad as i noted in my last message,
bk::generate(ostream_iterator<char>(cout), "Command line options not recognized:\n" << (" \"" << ba::string % ("\"" << bk::eol)) << "\"" << bk::eol, vsUnrecog);
Does almost what it should, except the prefix is only diplayed for the first item in the list (it thus doesn't seem to belong to the list.
Output wanted: Options not recognized: "dd" "-e" "rrty"
Output got: Options not recognized: "dd" -e" rrty"
It seems unneccesarily complex though, and I have to put "\"" << bk::eol in the code twice, is that really necessary?
Er, do this I mean (adding spacing to help clarify things for you to): bk::generate(ostream_iterator<char>(cout), "Command line options not recognized:\n" << (" \"" << ba::string << '\"') % bk::eol ,vsUnrecog); To describe it, it first prints out a string, then the % operator has two part, the left side ('\"' << ba::string << '\"'), and the right bk::eol, meaning that the left side is run for each element in a list separated by returns.