preprocessor directive - Token pasting in c using a variable that increments -


i have set of arrays :msg1[] msg2[] .... msgn[] . , need use values in while loop. msgi[]. when define #define msg(a) msg##a , put in loop , increment i, expands msgi?

you can't way. instead create new array, contains pointers actual arrays:

int array1[...]; int array2[...];  int *all_arrays[] = { array1, array2 }; 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -