mardi 17 novembre 2015

Initiate macro on runtime

I have C program which uses several static variables.

#define A 5
#define B 1
#define C 60

Now, I want to determine which values I should give to these macros to get the best results from my algorithm.

To find these values I just want to run my algorithm for each value I want to test.

To do so I have to change the value of these macros on runtime.

Is there a way to do so? (Honestly, since these are static I don't expect so) Alternative: is there another (better) way to achieve my testing goals?

Aucun commentaire:

Enregistrer un commentaire