函数参数里的&怎么判断是引用还是取地址的研究

刚开始。不熟。函数参数里的&怎么判断是引用还是取地址。

int b; void a(int &p); void a(int* p);

a(b); a(&b);先这样理解。

void a (T&&) maybe rvalue reference of equal qualifier, void a(int &) maybe lvalue reference. not sure

[OHOS ERROR] In file included from .../.../foundation/multimodalinput/input/frameworks/proxy/events/src/axis_event.cpp:16:

[OHOS ERROR] In file included from .../.../foundation/multimodalinput/input/interfaces/native/innerkits/event/include/axis_event.h:21:

[OHOS ERROR] In file included from .../.../foundation/multimodalinput/input/interfaces/native/innerkits/event/include/input_event.h:28:

[OHOS ERROR] .../.../foundation/multimodalinput/input/interfaces/native/innerkits/event/include/pointer_event.h:34:29: error: unknown class name 'InputEvent'; did you mean 'RawInputEvent'?

[OHOS ERROR] class PointerEvent : public InputEvent {

[OHOS ERROR] ^~~~~~~~~~

[OHOS ERROR] RawInputEvent

[OHOS ERROR] .../.../foundation/multimodalinput/input/util/common/include/struct_multimodal.h:426:8: note: 'RawInputEvent' declared here

[OHOS ERROR] struct RawInputEvent {

[OHOS ERROR] ^

[OHOS ERROR] In file included from .../.../foundation/multimodalinput/input/frameworks/proxy/events/src/axis_event.cpp:16:

[OHOS ERROR] In file included from .../.../foundation/multimodalinput/input/interfaces/native/innerkits/event/include/axis_event.h:21:

[OHOS ERROR] In file included from .../.../foundation/multimodalinput/input/interfaces/native/innerkits/event/include/input_event.h:28:

[OHOS ERROR] .../.../foundation/multimodalinput/input/interfaces/native/innerkits/event/include/pointer_event.h:688:63: error: unknown type name 'InputEvent'; did you mean 'RawInputEvent'?

[OHOS ERROR] static std::shared_ptr from(std::shared_ptr inputEvent);

[OHOS ERROR] ^~~~~~~~~~

[OHOS ERROR] RawInputEvent

怎么回事?这是在inputevent.h中加了些东西。

相关推荐
c++初学者ABC21 分钟前
学生管理系统C++版(简单版)详解
c++·结构体·学生管理系统
kucupung21 分钟前
【C++基础】多线程并发场景下的同步方法
开发语言·c++
L73S3727 分钟前
C++入门(1)
c++·程序人生·考研·蓝桥杯·学习方法
迂幵myself32 分钟前
14-6-1C++的list
开发语言·c++·list
w(゚Д゚)w吓洗宝宝了1 小时前
观察者模式 - 观察者模式的应用场景
c++·观察者模式
捕鲸叉3 小时前
Linux/C/C++下怎样进行软件性能分析(CPU/GPU/Memory)
c++·软件调试·软件验证
涛ing4 小时前
23. C语言 文件操作详解
java·linux·c语言·开发语言·c++·vscode·vim
半桔4 小时前
栈和队列(C语言)
c语言·开发语言·数据结构·c++·git
阿猿收手吧!4 小时前
【Linux网络总结】字节序转换 收发信息 TCP握手挥手 多路转接
linux·服务器·网络·c++·tcp/ip
NOAHCHAN19875 小时前
怎么解决Visual Studio中两个cpp文件中相同函数名重定义问题
c++·visual studio