Why do you think vector defines its single-argument constructor as explicit, but string does not
belongs to book: C++ Primer|Stanley B.Lippman, Josee Lajoie, Barbara E.Moo|5th Edition| Chapter number:7| Question number:51
All Answers
total answers (1)
Because semantically speaking, a number is different from a vector, but a char array is the same as a string.
need an explanation for this answer? contact us directly to get an explanation for this answer