Macro definitions are throwing errors

Hello im having an error where my macro definitions are throwing an error. The lines that are throwing the error are

#define DIGI_POT_CS_PIN 71


#define MOTOR1_EN_IN1 11

Here is the error code

doc.h:74:25: error: expected identifier before numeric constant

 #define DIGI_POT_CS_PIN 71

doc.h:78:23: error: expected identifier before numeric constant

 #define MOTOR1_EN_IN1 11

Any ideas why its throwing this error?

The problem is surely in the code you haven't shown us.

You are absolutelty right, i have been reviewing my code and i mistakenly initialize a class

What i did was this

TPL0202 digiPot(DIGI_POT_CS_PIN);

instead the correct way should be(one of correct ways to do it)

TPL0202 digiPot = TPL0202(DIGI_POT_CS_PIN);

its kinda misleading that it point the error to the macro definitions

Macros do tend to lead to confusing error messages. This is one of the reasons why I recommend avoiding using them unless there is no other option.

John41234:
You are absolutelty right, i have been reviewing my code and i mistakenly initialize a class

No, the first initialization was perfectly valid. The problem lies elsewhere. But, since you appear unwilling to post complete code, I will be difficult to determine exactly what it is.