3 ms·
I believe the standard practice is: // file.h #ifndef FILE_DECLSPEC #define FILE_DECLSPEC inline #endif FILE_DECLSPEC int add_one(int x) {
by oshiar53-0 5y ago
I believe the standard practice is:
// file.h
#ifndef FILE_DECLSPEC
#define FILE_DECLSPEC inline
#endif
FILE_DECLSPEC int add_one(int x) {
return x + 1;
}
// file.c
#define FILE_DECLSPEC
#include "file.h"
In this way you don't keep the declarations in both files.