jeudi 14 novembre 2019

#define before class or function name [duplicate]

This question already has an answer here:

I inherited some code i need to maintain, looking into it i've found many istances of the following:

in the .h

#define API_INTERFACE

class API_INTERFACE ClassName{
    public:
        getNumber();
};

and then in the .cpp

int API_INTERFACE ClassName::getNumber(){return 1;};

What does the #define API_INTERFACE actually do in the contest of the class/function implementation? I've never seen a definition like this and I don't understand what it should represent.

Aucun commentaire:

Enregistrer un commentaire