如何在 C++ 中读取这种指针? [英] How to read this kind of pointer in c++?
本文介绍了如何在 C++ 中读取这种指针?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
CUnknown* (*)( LPUNKNOWN pUnk, HRESULT* phr );
似乎我一直在阅读如此复杂的指针时遇到麻烦..
Seems I've always been in trouble reading such complicated pointers..
如何阅读它?如果表达式更长怎么办?
How do you read it? what if the expression even longer?
推荐答案
顺时针螺旋规则帮助我理解这样的事情.来自网站:
The Clockwise Spiral Rule helps me understand things like this. From the site:
- 从未知元素开始,沿螺旋/顺时针方向移动;当遇到以下元素时,用相应的英文语句替换它们:
继续以螺旋/顺时针方向执行此操作,直到覆盖所有标记.
- Starting with the unknown element, move in a spiral/clockwise direction; when ecountering the following elements replace them with the corresponding english statements:
Keep doing this in a spiral/clockwise direction until all tokens have been covered.
总是先解决括号中的任何问题!
Always resolve anything in parenthesis first!
[X] 或 []
=> 数组 X 大小...或数组未定义大小...
=> Array X size of... or Array undefined size of...
(type1, type2)
=> 函数传递 type1 和 type2 返回...
=> function passing type1 and type2 returning...
*
=> 指向...的指针
=> pointer(s) to...
这篇关于如何在 C++ 中读取这种指针?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文