如何在vc ++ win32控制台应用程序中使用委托? [英] How to use delegates in vc++ win32 console application?
本文介绍了如何在vc ++ win32控制台应用程序中使用委托?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在vc ++ win32控制台应用程序中使用委托?在声明并初始化委托之后.
How to use delegates in vc++ win32 console application? after declaring and initializing the delegate. How to create and signal the event using that delegate.
推荐答案
^ ]
用于VC ++ 6的.NET样式委托 [代表和活动 [
Generic Delegates (Visual C++)[^]
.NET style delegates for VC++ 6[^]
Delegates and Events[^]
解决方案1中的链接均适用于.NET环境.从问题的标签中可能很可能不是在使用.NET,而是纯C ++代码.
可以在CodeProject上找到一篇很好的文章,其中包含对代理人的顺利介绍:
>
The links in Solution 1 are all geared towards the .NET environment. From the tags of your question it might well be that you are not using .NET, but plain C++ code.
A good article with a smooth introduction of delegates can be found here on CodeProject:
Member Function Pointers and the Fastest Possible C++ Delegates
Try this one, but be warned that this is an advanced subject.
这篇关于如何在vc ++ win32控制台应用程序中使用委托?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文