摘要:        
// Cast a dynamically allocated string to 'void*'. void *vp = static_cast<void*>(new std::string("it's easy to break stuff like this!")); // Then, in     阅读全文
posted @ 2018-11-22 19:13
kuaqi
阅读(214)
评论(0)
推荐(0)
        
            
        
        
摘要:        
string、char[]、char*、const char*; 输出都一样 printf只能输出c语言中的内置数据,string不是c语言内置数据; cout可以输出string字符串,是因为string中重载了“<<”操作符; printf_s("%s\n", arrc); \\char[]pr    阅读全文
posted @ 2018-11-22 19:09
kuaqi
阅读(252)
评论(0)
推荐(0)
        
            
        
        
摘要:        
在处理LPTSTR或LPCTSTR的时候,应该使用_tcslen来替代strlen函数。否则,在Unicode编码方式下,strlen不能处理wchar_t*的字符串。    阅读全文
posted @ 2018-11-22 18:55
kuaqi
阅读(427)
评论(0)
推荐(0)
        
            
        
        
摘要:        
格式: CString cstr.AppendFormat(_T(" %.4f "), ); 输出: (1) https://blog.csdn.net/overlord_bingo/article/details/60140224 不含中文的情况下: CString s("hello world"    阅读全文
posted @ 2018-11-22 18:25
kuaqi
阅读(252)
评论(0)
推荐(0)
        
                    
                
浙公网安备 33010602011771号