大约有 35,487 项符合查询结果(耗时:0.0331秒) [XML]

https://bbs.tsingfun.com/thread-605-1-1.html 

sizeof、strlen简单总结 - C/C++ - 清泛IT论坛,有思想、有深度

sizeof strlen const char* p 4 字符串长度 std::string 4 字符串长度 "......" 字符串长度+1   ('\0') 字符串长度
https://bbs.tsingfun.com/thread-763-1-1.html 

如何获取控件的值? - C++ UI - 清泛IT社区,为创新赋能!

...String str; GetDlgItemText(IDC_EDIT_TEST, str); int d=atoi(str.GetBuffer(0)); 更优雅的: .h:int m_editTest; .cpp: void CxxDlg::DoDataExchange(CDataExchange* pDX) {     DDX_Text(pDX, IDC_EDIT_TEST, m_editTest); } 这样就绑定了控件和一个数据变量,当控...
https://www.tsingfun.com/it/cp... 

CDHtmlDialog的基本使用(C++调用JS函数的实现) - C/C++ - 清泛网 - 专注IT技能提升

...c = NULL; CDHtmlDialog::GetDHtmlDocument(&pDoc); DISPPARAMS param = {0}; VARIANT vtRet; CallJSFunction(pDoc, _T("CppCallJsFunc"), param, &vtRet, NULL, NULL); } HRESULT CJSCppInteractiveDlg::CallJSFunction(IHTMLDocument2* pDoc2, CString strFunctionName, DISPPARAMS di...
https://www.tsingfun.com/it/cp... 

ATL CComPtr和CComQIPtr详解 - C/C++ - 清泛网 - 专注IT技能提升

......; CComPtr<IBar> pBar; HRESULT hr = pFoo.QueryInterface(&pBar); (10) IsEqualObject方法 IsEqualObject方法用来判断两个接口指针释放引用的是同一个对象。 (11) != 和 == 操作符 跟普通的 一样 (12) CComPtr对IDispatch的特化 CComPtr<IDispatch> iptr; ...
https://www.tsingfun.com/it/cp... 

Linux C++程序内存占用过高的原因分析 - C/C++ - 清泛网 - 专注C/C++及内核技术

...valgrind工具跟踪泄漏点。 2、如果交换内存使用几乎为0的话,考虑可能是内存碎片过多导致的,这种情况下可以考虑使用 jemalloc,使用preload方式载入 jemalloc,接替系统的内存分配函数,可极大消除内存碎片问题。 valgrind 内存...
https://www.tsingfun.com/it/cp... 

cout保留两位小数输出 - C/C++ - 清泛网 - 专注C/C++及内核技术

... << std::fixed << std::setprecision(2) << dval << std::endl; return 0; } 输出的结果均为123.46,可以试试代码区右上角在线编译运行查看实际运行结果。cout setprecision 小数
https://www.tsingfun.com/it/cpp/gcc-asan.html 

gcc自带内存泄漏、内存越界检测工具 - asan - C/C++ - 清泛网 - 专注C/C++及内核技术

... int main() { void* p = malloc(5); memcpy(p, "123456", 6); return 0; } 运行结果如下: 报告非常详细,内存异常发生的行号都能看到,也可以识别出来野指针。强烈建议后台服务上线前进行一次内存检查,可以提前避免一些莫名其妙...
https://www.tsingfun.com/it/cp... 

C++ protobuf使用入门实例 - C/C++ - 清泛网 - 专注C/C++及内核技术

...e` is JSON `null`. enum TestNullValue { // Null value. NULL_VALUE = 0; } // `ListValue` is a wrapper around a repeated field of values. // // The JSON representation for `ListValue` is JSON array. message TestListValue { // Repeated field of dynamically typed values. repeated Tes...
https://www.tsingfun.com/it/cp... 

【解决】asan runtime does not come first in initial library list - C/C...

...态链接 -static-libasan 6、export ASAN_OPTIONS=verify_asan_link_order=0禁用检查(仅高版本gcc支持)。 注:加-fsanitize=address编译选项可以检查出更详细的内存问题,不加也能编译通过也能执行检查。 参考:https://stackoverflow.com/questions/598...
https://www.tsingfun.com/it/cp... 

CDHtmlDialog的基本使用(C++调用JS函数的实现) - C/C++ - 清泛网移动版 -...

...c = NULL; CDHtmlDialog::GetDHtmlDocument(&pDoc); DISPPARAMS param = {0}; VARIANT vtRet; CallJSFunction(pDoc, _T("CppCallJsFunc"), param, &vtRet, NULL, NULL); } HRESULT CJSCppInteractiveDlg::CallJSFunction(IHTMLDocument2* pDoc2, CString strFunctionName, DISPPARAMS di...