This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: a string problem
- To: Gerhard Wesp <gwesp at cosy dot sbg dot ac dot at>
- Subject: Re: a string problem
- From: Benjamin Kosnik <bkoz at cygnus dot com>
- Date: Tue, 12 Oct 1999 13:29:26 -0700 (PDT)
- cc: libstdc++ at sourceware dot cygnus dot com
> % cat foo.cc
> #include <string>
>
> void foo() { std::string s(10,0); }
whoops. This is not a compiler or library implementation bug--the
arugments get deduced as iterators, as you pointed out earlier. You'll
have to cast to
string s(10, char(0)) to call the constructor that you're intending.
-benjamin