2012年8月14日

c++string转int

摘要: string s ="0xffff";int t =0; sscanf(s.c_str(),"%x",&t); 阅读全文

posted @ 2012-08-14 16:28 Orz.. 阅读(145) 评论(0) 推荐(0)

c++ stl 的string 的size() legth()区别

摘要: 最近在查一个bug的时候看到这个说法,看了一下.有几种说法也有人说出一系的解释VC.net 7.0中:size_type length() const{ // return length of sequencereturn (_Mysize);}size_type size() const{ // return length of sequencereturn (_Mysize);}GCC 3.3.3中:size_typesize() const { return _M_rep()-> _M_length; }size_typelength() co... 阅读全文

posted @ 2012-08-14 16:27 Orz.. 阅读(492) 评论(1) 推荐(1)

导航