当前位置:网站首页>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;
};
边栏推荐
- Spark Learning: build SQL to meet the specified optimization rules
- Huawei wireless device security policy configuration command
- Vim: extend the semantic analysis function of YCM for the third-party library of C language
- Little dolphin "transformed" into a new intelligent scheduling engine, which can be explained in simple terms in the practical development and application of DDS
- [Luogu p5410] [template] extend KMP (Z function) (string)
- Spark Learning: Spark implementation of distcp
- Write a simple memo using localstorage
- 详解LinkedList
- Code random notes_ Linked list_ Turn over the linked list in groups of 25K
- PHP Basics - PHP magic method
猜你喜欢

Open source summer interview | learn with problems, Apache dolphin scheduler, Wang Fuzheng
![[don't bother with intensive learning] video notes (III) 1. What is SARS?](/img/5c/4636db2849ba8514976a5afaf56e38.png)
[don't bother with intensive learning] video notes (III) 1. What is SARS?

Cess test online line! The first decentralized storage network to provide multiple application scenarios

Implementation principle of acid in MySQL
![[MySQL] - deep understanding of index](/img/a6/6ca1356fe11bd33ec7362ce7cdc652.png)
[MySQL] - deep understanding of index

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

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

详解LinkedList
![[don't bother with reinforcement learning] video notes (I) 3. Why use reinforcement learning?](/img/57/0ebff0839d2a2898472d3270fd13df.png)
[don't bother with reinforcement learning] video notes (I) 3. Why use reinforcement learning?

Recursion - if the function calls itself internally, then the function is a recursive function & the effect is the same as that of the loop & the push condition return should be added, otherwise stack
随机推荐
Cloud primordial (12) | introduction to kubernetes foundation of kubernetes chapter
Firewalld firewall related commands
It is reported that the prices of some Intel FPGA chip products have increased by up to 20%
Definition and initialization of cv:: mat
Spark Learning: using RDD API to implement inverted index
Spark Learning: implement compact table command
[don't bother with reinforcement learning] video notes (I) 1. What is reinforcement learning?
Android Version Description security privacy 13
PHP log base - monolog knowledge collation
C#/VB. Net: convert word or EXCEL documents to text
Learn more about the synchronized lock upgrade process [concurrent programming]
Makefile变量及动态库静态库
JS bind simulation
JS locate Daquan to get the brother, parent and child elements of the node, including robot instances
Leetcode skimming: dynamic planning 03 (climb stairs with minimum cost)
Reading makes people improve my list
[C language] implementation of three versions of address book small project (including source code)
Map processing background management menu data
[Luogu p3426] SZA template (string) (KMP)
[note] what is kernel / user space? Let's start with how the CPU runs the program