价值od这个设备ptr [英] value od this device ptr

查看:61
本文介绍了价值od这个设备ptr的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

#define Max_port 9
char ChannelPtr=0;
char DevicePtr[Max_port];
++ChannelPtr;
++DevicePtr[ChannelPtr-1];







我的问题是 ++ DevicePtr [ChannelPtr-1] =



请回复我....




My question is ++DevicePtr[ChannelPtr-1]= ?

Please reply me....

推荐答案

该值将比DevicePtr [0]中的值多1。

由于您尚未初始化数组,因此未定义其包含的值。

它可以初始化为零,但这不能保证。



正如其他人所说,你可以自己轻松尝试一下。

当你尝试它时,在不同的操作系统上尝试不同的编译器。
The value would be 1 more than the value in DevicePtr[0].
Since you have not initialized the array, the value it contains is not defined.
It could be initialized to zero, but this is not guaranteed.

As others have said, you could easily try this out yourself.
When you try it, try it with different compilers on different OSs.


这篇关于价值od这个设备ptr的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆