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

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

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中加了些东西。

相关推荐
寒笙LED1 小时前
C++详细笔记(六)string库
开发语言·c++·笔记
就爱六点起3 小时前
C/C++ 中的类型转换方式
c语言·开发语言·c++
召木3 小时前
C++小白实习日记——Day 2 TSCNS怎么读取当前时间
c++·职场和发展
St_Ludwig4 小时前
C语言 蓝桥杯某例题解决方案(查找完数)
c语言·c++·后端·算法·游戏·蓝桥杯
Jack黄从零学c++4 小时前
opencv(c++)---自带的卷积运算filter2D以及应用
c++·人工智能·opencv
sweetheart7-74 小时前
LeetCode20. 有效的括号(2024冬季每日一题 11)
c++·算法·力扣··括号匹配
gma9995 小时前
brpc 与 Etcd 二次封装
数据库·c++·rpc·etcd
ö Constancy5 小时前
设计LRU缓存
c++·算法·缓存
C++忠实粉丝5 小时前
计算机网络socket编程(2)_UDP网络编程实现网络字典
linux·网络·c++·网络协议·计算机网络·udp
Mongxin_Chan6 小时前
【Cpp】指针与引用
c++·算法