+ 2

ostream iterator

Hi All Is below code's output proper? https://code.sololearn.com/c2a6a23A15a1 I thought output should be K;E;T;A;N but actual output is ;KETAN

19th Mar 2021, 4:03 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
1 Odpowiedź
+ 2
You mistyped "<<" for "," in ostream_iterator<char>(cout<<";") Which is first printing ";" to the console and then coping the string at the end of output iterator. Here's the fix 👇 https://code.sololearn.com/cDVB9wesMARN/?ref=app
19th Mar 2021, 4:38 PM
Arsenic
Arsenic - avatar