Error[Pe513]: a value of type "int" cannot be assigned to an entity of type "char (*)[6]" D:\Passion

再移植程序过程中碰到的问题,这里提供一种情况以及解决方法。对于赋值操作

xxx=xxx();

左边xxx是A.c中的指针变量,xxx()是B.c中的函数,结果报错

Error[Pe513]: a value of type "int" cannot be assigned to an entity of type "char (*)[6]" D:\Passion

一种原因是再B.h中没有声明函数xxx();  回到B.h中将xxx()函数声明一次就好。

 

 

  • 9
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
这个错误是由于将一个int类型的值赋给了一个lv_obj_t*类型的变量引起的。根据引用\[1\]和引用\[2\]的描述,这个错误通常发生在函数返回值无法赋值给对应变量的情况下。根据引用\[3\]的描述,可能的原因有两个:第一,函数返回值是int型,而变量是lv_obj_t*类型;第二,调用函数的文件没有包含函数的声明。要解决这个错误,你可以检查一下函数的返回值类型和变量的类型是否匹配,并确保在调用函数之前包含了函数的声明。 #### 引用[.reference_title] - *1* [keil(MDK)中出现error: #513:](https://blog.csdn.net/u014717398/article/details/54316666)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [【踩坑】 a value of typeint“ cannot be assigned to an entity of type “TaskHandle_t](https://blog.csdn.net/weixin_46942417/article/details/117947672)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [类似Build Error: #513: a value of type "int" cannot be assigned to an entity of type "char *](https://blog.csdn.net/z497544849/article/details/54612568)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值