Problem description
Some time ago, I started a small smart home project to practice my hand. I encountered this problem when compiling
Compilation error:
reason:
The function pointer
in the structure element is incorrectly defined
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <wiringSerial.h>
struct Command{
char cmdName[128];
char cmd[32];
int (*init)(); //int init();
int (*getCmd)(struct Command *voice); //int getCmd(struct Command *voice);
char log[1024];
int fd;
struct Command *next;
};
Read More:
- [Solved] “Field pet in XXX.HelloController required a bean of type ‘XXX.Pet‘ that could not be found.“
- React Hook “useState“ is called in function “xxx“ which is neither a React function component or
- [Solved] matlab error: try to write SCRIPT vl_sift is executed as a function
- [Solved] Eslint error: /xxx/components/xxx import should occur after import of /xxx/utils/xxx
- [Solved] Keil error: #101: “name“ has already been declared in the current scope
- Yaml is installed, and the error YAMLLoadWarning is reported as soon as the code runs: calling yaml.load() without Loader=… is deprecated, as the default Loader is unsafe.
- [Solved] Android Develop Error: xxx does not have a NavController set on xxx
- [Solved] Could not resolve placeholder ‘XXX‘ in value “${XXX}“
- How to Solve Error:‘itoa’ was not declared in this scope
- [Solved] validateRenderPassDescriptor:xxx: failed assertion XXX
- [Solved] error: ‘CV_GRAY2BGR’ was not declared in this scope
- [Solved] SpringMVC Error: element web-app must be declared
- [Solved] MIT cheetah make error: ‘ioctl’ was not declared in this scope
- [Solved] kernel: nvme nvme0: I/O xxx QID xxx timeout, aborting
- Error c4996: ‘getversionexa’: declared rejected [How to Solve]
- [Solved] error: ‘xcb_generic_event_t’ was not declared in this scope
- [Solved] Tensorflow2.0 Error: Function call stack:distributed_function
- [Solved] OpenCV ERROR: The minSdk version should not be declared in the android manifest file
- How to Solve Error: Unsupported field: HourOfDay
- [Solved] kitt2bag Error: Failed to find match for field intensity