![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
huoyin
这个作者很懒,什么都没留下…
展开
-
在win32应用中使用printf代码示例
#include #include /**If the program is supposed to run in the GUI subsystem - ie. the entry function is WinMain and the compiler/lin原创 2011-07-27 10:02:33 · 2868 阅读 · 1 评论 -
GDB 调试
启动gdb --args ./application_1 --args *查找文件(gdb) set logging on # GDB output will now be copied into gdb.txt(gdb) info sources(gdb) set logging off(gdb) shell grep bob.cpp gdb.txt(gdb) shel...原创 2019-01-04 13:18:07 · 470 阅读 · 0 评论 -
GCC学习日志
1) 今天碰到GCC编译后运行失败,报symbol lookup failed, undefined symbol用命令nm -C 发现U,调整静态库顺序后搞定,其原因未知。原创 2017-08-11 10:37:03 · 851 阅读 · 0 评论 -
禁止VS JIT debugger
Delete the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\DebuggerFor 64-bit operating systems also delete:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432N原创 2015-02-11 10:34:28 · 2184 阅读 · 0 评论 -
用C++创建Windows服务代码
Create a new C++ project. I used simply Empty Win32 Console Application in Visual Studio.CodingEvery service has to contain following items :A Main Entry point (like any application)A Se转载 2015-02-05 17:19:34 · 1067 阅读 · 0 评论 -
Visual Studio Troubleshooting Extensions with the Activity Log
One of the most powerful tools for troubleshooting issues that involve Visual Studio extensions is often overlooked, even though it has been around for quite some time (since VS 2005). Anyone wonder转载 2014-12-03 15:12:40 · 1063 阅读 · 0 评论 -
解决办法fatal error C1083: Cannot open precompiled header file: *.pcb
Right-click on your project in the Solution Explorer.Click Properties at the bottom of the drop-down menu.At the top left of the Properties Pages, select All Configurations from the drop-down menu原创 2014-04-17 10:39:46 · 1660 阅读 · 0 评论 -
C++ 线程安全的单例模式
转自:http://www.cnblogs.com/ccdev/archive/2012/12/19/2825355.html废话不多说,常用的代码积淀下来。一、懒汉模式:即第一次调用该类实例的时候才产生一个新的该类实例,并在以后仅返回此实例。需要用锁,来保证其线程安全性:原因:多个线程可能进入判断是否已经存在实例的if语句,从而non thread safety.使用do转载 2013-12-12 11:44:16 · 813 阅读 · 0 评论 -
Lambda Functions in C++11
转自:http://www.cprogramming.com/c++11/c++11-lambda-closures.htmlLambda Functions in C++11 - the Definitive GuideBy Alex AllainOne of the most exciting features of C++11 is ability to create转载 2013-09-10 11:54:09 · 2348 阅读 · 0 评论 -
Choosing between Critical Sections and Mutex
General points to consider:The performance cost of using the mechanism.The complexity introduced by using the mechanism.In any given situation 1 or 2 may be more important.E.g.If y原创 2013-08-16 13:30:39 · 1007 阅读 · 0 评论 -
WinDbg使用日志
1, 变量查看局部变量?? $!全局变量?? !查看字符数组dt -r原创 2013-02-27 11:18:29 · 1004 阅读 · 0 评论 -
Windbg使用日志
如何使用Windbg设置触发次数的条件断点1) Go to the source view and set a breakpoint in the source code. The shortcut F9 can be used to toggle a breakpoint.2) In the command window (alt + 1), list all breakpoint原创 2011-08-23 17:28:18 · 884 阅读 · 0 评论 -
c语言静态变量和静态函数
static C语言 C语言程序可以看成由一系列外部对象构成,这些外部对象可能是变量或函数。而内部变量是指定义在函数内部的函数参数及变量。外部变量定义在函数之外,因此可以在许多函数中使用。由于C语言不允许在一个函数中定义其它函数,因此函数本身只能是“外部的”。 由于C语言代码是以文件为单位来组织的,在一个源程序所有源文件中,一个外部变量或函数只能在某个文件中定义转载 2012-08-29 15:18:27 · 1147 阅读 · 0 评论 -
如何解决warning: incompatible implicit declaration of built-in function 'malloc'
在代码中包含:int *x = malloc(sizeof(int)); 得到gcc编译错误:***: warning: implicit declaration of function ‘malloc’***: warning: incompatible implicit declaration of built-in function ‘malloc’ 解决办法原创 2012-01-17 13:07:26 · 32962 阅读 · 1 评论 -
VC6.0内存泄露检测工具
BoundsChecker for Visual C++ 6.0是针对开发出高质量的32位Visual C++ 6.0应用程序的最为全面的错误检测工具。BoundsChecker 能自动指出静态,堆栈内存错误和资源泄漏问题。与一般的内存检测工具不同,BoundsChecker 能够校验最新的 Windows APIs,包括 ActiveX, DirectX, OLE/COM, ODBC等等。Bou转载 2011-11-12 10:55:14 · 1047 阅读 · 0 评论 -
Visual Statio 开发环境常用技巧
1、快速格式化代码快捷键:alt+f82、快速注释多行代码快捷键:Ctrl+K & Ctrl+C3、显示行号,VC2005, 查找tools->options->text editor->all languages->general,或者用Ctrl+G直接定位到你想去的行原创 2011-02-17 14:03:00 · 1503 阅读 · 0 评论 -
转载:A word for WinDbg
Before I came to work at Microsoft I worked as a professional developer on the Microsoft platform and I used to work with the Visual Studio原创 2011-07-29 14:38:14 · 1064 阅读 · 0 评论 -
[转]vs2010 编译 log4cxx 0.10.0
原文:http://www.cnblogs.com/walfud/articles/2453738.html1.下载log4cxx 以及 apr 和 apr-util 源码:a)http://www.apache.org/dyn/closer.cgi/logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.zipb)http://archiv...转载 2019-03-28 08:50:48 · 601 阅读 · 0 评论