Bonjour,
Je cherche à compiler mon code après rajout de ce morceau de code suivant:
Je rajoute ce code au tout début de mon main.cpp et avant ma fonction int main () incluse dans main.cpp.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 #define SET_SENSOR_PARAMETER(id, type, value) { type## _TYPE buf = value; errorCode = SetSensorParameter(id, type, &buf, sizeof(buf)); if(errorCode!=BIRD_ERROR_SUCCESS) ; } // DATA_FORMAT_TYPE already defined as an enumerated type typedef DOUBLE_ANGLES_RECORD ANGLE_ALIGN_TYPE; typedef DOUBLE_ANGLES_RECORD REFERENCE_FRAME_TYPE; typedef bool XYZ_REFERENCE_FRAME_TYPE; // HEMISPHERE_TYPE already defined as an enumerated type typedef bool FILTER_AC_WIDE_NOTCH_TYPE; typedef bool FILTER_AC_NARROW_NOTCH_TYPE; typedef double FILTER_DC_ADAPTIVE_TYPE; typedef ADAPTIVE_PARAMETERS FILTER_ALPHA_PARAMETERS_TYPE; typedef bool FILTER_LARGE_CHANGE_TYPE; typedef QUALITY_PARAMETERS QUALITY_TYPE;
J'obtiens les erreurs suivantes:
J'ai bien sur tenté de faire des recherches sur les préprocesseurs et macros ainsi que sur le principe de concaténation mais j'avoue que je suis largué!||=== Build: Debug in RV1 (compiler: GNU GCC Compiler) ===| C:\WORK\CPP\SDLprojet\src\main.cpp|15|error: stray '##' in program| C:\WORK\CPP\SDLprojet\src\main.cpp|14|error: expected unqualified-id before '{' token|
Un peu d'aide serait la bienvenue.
Merci!
Partager