Re: [cpp] 关于STL中string的问题

Chen Shuo giantchen at gmail.com
Thu Mar 2 21:14:52 CST 2006


应该返回 string::iterator,按理它不是一个plain
pointer,所以在debug方式下应该编译不过(release下会优化为plain
pointer)。string::c_str()才是返回const char*的。

On 3/2/06, ZiDing <xuziding at gmail.com> wrote:
> 在 Thu, 02 Mar 2006 14:54:08 +0800,苏益ꪏ <sdyredwolf at tom.com> 写道:
>        汗! string::begin()返回的不是const的??这个可以通过编译嘛?
> > string Buffer;
> > sprintf( Buffer.begin(),"%d",10);
>
>
>
> --
> 使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/
>
>
> _______________________________________________
> Cpp mailing list
> Cpp at codingnow.com
> http://codingnow.com/mailman/listinfo/cpp
>
>



More information about the Cpp mailing list