pointer to different objects(51单片机程序编译出现‘Argument’:conversion:pointer to non-pointer)
本文目录
- 51单片机程序编译出现‘Argument’:conversion:pointer to non-pointer
- c语言编程报错时出现“pointer addition requires integral operand”是什么错误
- 同一项目文件的编译,在伟福下没有错误和警告,而在Keil下却有warning C182: pointer to different objects
- C51编译警告warning C182: pointer to different objects
- C51 编译出现warning C182:pointer to different objects
- pointer怎么读
- 请教keil c 里的结构数组怎么被函数参数带入其地址
- 关于keil编译器下指针指向数组警告的问题
- Nexus 7 安卓6.0更改验证服务器出错 java.lang.NullPointerException
51单片机程序编译出现‘Argument’:conversion:pointer to non-pointer
是指针转换错误吧,你传递的是汉字,要看LCD的驱动Write_lcd()是否支持处理汉字,一般LCD厂家提供的处理汉字和字符的驱动函数不一样
Write_lcd(0,1,"液"); 传递给函数的是字符串的指针,但是函数原型Write_lcd(unsigned int x,unsigned int y,unsigned int word)定义的word是int 类型,也就是说Write_lcd()不支持指针和汉字。
c语言编程报错时出现“pointer addition requires integral operand”是什么错误
这是由于试图让一个指针加上一个非整形的数,比如int* p; p+1.1
下面是MSDN里的解释:
Error Message
’+’ : pointer addition requires integral operand
An attempt was made to add a nonintegral value to a pointer using the plus ( + ) operator.
The following sample generates C2111:
Copy Code
// C2111.cpp
int main() {
int *a = 0, *pa = 0, b = 0;
double d = 0.00;
a = pa + d; // C2111
a = pa + b; // OK
}
同一项目文件的编译,在伟福下没有错误和警告,而在Keil下却有warning C182: pointer to different objects
贴出完整的提示内容。
目前来看是提示有指针被赋值的内容与其类型不符。
不同的编译器对于不同的语法错误是有不同的处理方法的。
C51编译警告warning C182: pointer to different objects
以前听说过指向指针的指针,和二维数组的数组名是有区别的,不知道,只是不是同样的原因。
C51 编译出现warning C182:pointer to different objects
pd 是 unsigned char *data 类型的 ,b 是 double 型的,所以 pd=&b 错了,类型不一致
pointer怎么读
pointer的读音是英。
一、读音
英。
二、释义
提示;建议;标志;迹象;兆头;动向。
三、词性
作名词:提示;建议;标志;迹象;兆头;动向;(刻度盘的)指针;指示杆;指针(光标);指示犬。
四、同义词
prompt n.提示;提示符。v.提示;促使;激起;导致。adj.迅速;敏捷;准时;立即的。adv.准时地。
reminder n.提醒;引起回忆的事物;提醒人的事物;(告知该做某事的)通知单;提示信。
point out指点;指明;指出;说出(事实或错误);提示。
五、中文解释
提示:(动)把对方没有想到或想不到的地方提出来,引起大家注意:老师~同学们注意画面左下方。出自鲁迅《书信集·致胡适》:“这种历史的提示,胜于许多空理论。”
六、词根词缀
point,punct,pung=point,to make sharp点;变尖。acupuncture n.针灸;appoint v.指派;compunction n.悔恨;disappoint v.使失望;受挫折;pointer n.指针;指示者;punch v.打洞。
pointer的例句:
1、Prior to setting up a connection,whether secure or not,a pointer for a BIO object needs to be created.
在建立连接(无论安全与否)之前,要创建一个指向BIO对象的指针。
2、This warning is typically reported because an integer has been used for a%p format instead of a pointer.
通常,如果为%p格式使用的是整数而不是指针,将报告此警告。
3、Check off the box at the bottom,click Apply,then tap your CTRL key once.You’ll see an animated circle appear around the pointer once.
选中下方的选项,点击“应用”,接着按一下CTRL键,你能马上看到一个动态变化的圆出现在鼠标指针处。
4、Move the pointer over the butt*** of the StackView control,and then click a button to see the appearance of its selected state.
将指针移到StackView控件的按钮上方,然后单击任一按钮以查看其选定状态的外观。
5、When a virtual function is called through a reference or pointer,the compiler generates code to decide at run time which function to call.
当虚函数通过引用或者指针调用时,编译器生成代码来决定在运行期调用哪个函数。
6、Within a week,100mw green laser pointer,the pen sales more than 3 months the total cost of advertising.
在一个星期内,该钢笔销售总额超过了3个月的广告总成本。
请教keil c 里的结构数组怎么被函数参数带入其地址
你是要对于整体的unsigned char型自增么?如果是的话可以使用这种结构,将其再包装一层,便于对于各个位或者整体进行查看:
struct Bit_type
{
union
{
unsigned char bit;
struct
{
unsigned char bit0 : 1;
unsigned char bit1 : 1;
unsigned char bit2 : 1;
unsigned char bit3 : 1;
unsigned char bit4 : 1;
unsigned char bit5 : 1;
unsigned char bit6 : 1;
unsigned char bit7 : 1;
};
};
};
然后,再把指针取StructType_Byte *型即可。
使用可以p.bit0 = 1;这样使用。
以上
关于keil编译器下指针指向数组警告的问题
aaa已经被你定义成了常量数组,并且定位在code区中,所以aaa只能被作为code区的常量使用,如果你把aaa作为一个xdata*型(即指向xdata区)的指针传递给某个需要xdata*参数的函数,那么编译器就会警告。
记住:
code char* aaa;aaa是一个char型指针常量,指向默认的存储区域。
char code* aaa;aaa是一个char型指针变量,指向code区域
Nexus 7 安卓6.0更改验证服务器出错 java.lang.NullPointerException
com.MembBean.addUser(MembBean.java:19)
org.apache.jsp.regiester.addmemb_jsp._jspService(addmemb_jsp.java:95)
这句是告诉你你的类com.MembBean的addUser方法出错,在MembBean.java的19行,报空指针异常,
下面这些依次是你调用这个方法的过程
本文相关文章:
font字体网站(http://font.knowsky.com/这里的字体能否打包下载)
2026年4月16日 03:40
警告 did you mean strncmp(Linux mintcommand ’sudu’ not found,具体看图)
2026年4月14日 08:00
js写后端用什么框架(对于一个有js基础的人来说,nodejs难还是php难)
2026年4月4日 18:20
bochs上面运行电脑时显示的no boot table device是什么意思?bochs配置文件在哪下载
2026年4月3日 18:40
noresource什么意思(监视墙出现noresource是否还能正常录像)
2026年3月28日 06:00
更多文章:
shadow puppet(我们中国的传统文化有许多就好像剪纸 英文怎么写)
2026年4月19日 06:40
javascript网页去广告代码(javascript 右下角 广告代码)
2026年4月19日 06:20
restful目前来说是完美的(python有什么高性能的restful模块没)
2026年4月19日 06:00
ospf报文类型有哪些(OSPF的3种数据库、4种接口类型、5种报文类型都是哪些)
2026年4月19日 05:20
网页源代码复制粘贴提取文字(怎么可以让网页文字可以复制粘贴)
2026年4月19日 05:00
firefox火狐浏览器32位(用32位的和64位的火狐有很大的区别吗)
2026年4月19日 04:40
servlet生命周期三个方法参数(怎么配置servlet)
2026年4月19日 04:20



