uint8_t有* VS uint8_t有区别 [英] Difference between uint8_t* vs uint8_t

查看:2367
本文介绍了uint8_t有* VS uint8_t有区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是这两类的区别/用?我有一个关于指针的一个基本的了解,但我不能换我的头解决这个问题。

What is the difference/use for these 2 types? I have a basic understanding regarding pointers but I just can't wrap my head around this.

uint8_t* address_at_eeprom_location = (uint8_t*)10;

这行一个Arduino例如发现让我觉得很愚蠢。 :)

This line found in an Arduino example makes me feel so dumb. :)

所以基本上这是一个双指针?

So basically this is a double pointer?

推荐答案

的uint_t是无符号整数,这是直接存储在存储器中的数据。该uint_t *是指针,其中编号存储在存储器中。的(uint_t *)浇铸所述10 - (字面被转换为数字的存储器,以便在数十个二进制重新presentation)到指针类型。这会创建存储来存储10,和比将利用其地址并存储它在address_at_eeprom_location变量

The uint_t is the unsigned integer, this is the data stored directly in the memory. The uint_t * is the pointer to the memory in which the number is stored. The (uint_t*) is cast of the 10 - (literal which is translated to a number in the memory so the binary representation of the number ten) to the pointer type. This will create the storage to store the 10, and than will use its address and store it in the address_at_eeprom_location variable.

这篇关于uint8_t有* VS uint8_t有区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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