雾里看花集锦

来源:互联网 发布:im域名 编辑:程序博客网 时间:2024/05/22 02:04

有的code咋看起来,感觉没啥问题,

typedef bitset<16> mybit;int _tmain(int argc, _TCHAR* argv[]){mybit test_bs;test_bs.set(1, true);myprintf("%s", test_bs.to_string());}void myprintf(...){}

上述的code有时候运行没啥问题,但是有的时候导致crash。


仔细一看,原来。。。

myprintf("%s", test_bs.to_string().c_str());