I'm studying the preprocessors and got stuck with arrays. I use below preprocessor to initialise an array containing pre defined values.
#ifndef ARRAY
#define ARRAY
const char arr[]={10,20,30,40,50,60,80};
#endif
But their comes a problem. I want to take user input in that array. So, how can I write an array of dynamic size with preprocessor so that I can also take user input in it.
I've tried this but it gives me an error.
#define n 0
#ifndef ARRAY
#define ARRAY
const char arr[n] {};
#endif