当前位置:网站首页>error: field ‘XXX’ declared as a function
error: field ‘XXX’ declared as a function
2022-07-24 09:45:00 【Jiang tengxia】
Problem description
Some time ago, I started a small project of smart home , Use it to practice your hands , I encountered this problem when compiling
Compiler error :

reason :
In structural elements A function pointer Wrong definition
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <wiringSerial.h>
struct Command{
char cmdName[128];
char cmd[32];
int (*init)(); // It was dark purple before :int init();
int (*getCmd)(struct Command *voice); // It was dark purple before :int getCmd(struct Command *voice);
char log[1024];
int fd;
struct Command *next;
};
边栏推荐
- What if path is deleted by mistake when configuring system environment variables?
- PHP log base - monolog knowledge collation
- Dark king | analysis of zego low illumination image enhancement technology
- Re6:读论文 LeSICiN: A Heterogeneous Graph-based Approach for Automatic Legal Statute Identification fro
- Cess test online line! The first decentralized storage network to provide multiple application scenarios
- Account 1-3
- What is the cloud native mid platform business architecture?
- S2b2b system standardizes the ordering and purchasing process and upgrades the supply chain system of household building materials industry
- MySQL基础篇(一)-- SQL基础
- 07 Jason module
猜你喜欢

MySQL基础篇(一)-- SQL基础

配置系统环境变量的时候误删了Path怎么办?

Foreign lead operation takes one month to collect money, and the sideline still needs it

Hucang integrated e-commerce project (I): introduction to the project background and structure

Getting started with sorting - insert sorting and Hill sorting

It's eleven again. Those jokes about nagging programmers going home for blind dates

Development history of the first commercial humanoid biped robot in China

Cloud primordial (12) | introduction to kubernetes foundation of kubernetes chapter

代码随想录笔记_链表_25K个一组翻转链表

Racecar multi-point navigation experiment based on ROS communication mechanism
随机推荐
js定位大全获取节点的兄弟,父级,子级元素含robot实例
[note] what is kernel / user space? Let's start with how the CPU runs the program
Scala learning: why emphasize immutable objects?
Re6:读论文 LeSICiN: A Heterogeneous Graph-based Approach for Automatic Legal Statute Identification fro
Gin framework uses session and redis to realize distributed session & Gorm operation mysql
Cess test online line! The first decentralized storage network to provide multiple application scenarios
代码随想录笔记_链表_25K个一组翻转链表
This article takes you to understand the dynamic memory allocation of C language
Data center: started in Alibaba and started in Daas
Dorissql syntax Usage Summary
Account 1-3
JS locate Daquan to get the brother, parent and child elements of the node, including robot instances
SQL 优化原则
Embedded development: Tools - optimizing firmware using DRT
Tencent 5g innovation center was established, laying out key directions such as unmanned ports, smart mines and E-sports events
云原生(十二) | Kubernetes篇之Kubernetes基础入门
唐宇迪opencv-背景建模
Firewall off and on command
Scheme and software analysis of dual computer hot standby system "suggestions collection"
Color recognition of regions of interest in pictures and videos based on OpenCV