I'm trying to initialize an array of strings in C. I want to set one of the elements of the array from a variable, but I'm getting a compiler error. What's wrong with this?
char * const APP_NAME = "test_app";
char * const array_of_strings[4] = {
APP_NAME,
"-f", "/path/to/file.txt",
NULL
};
The error is error: initializer element is not constant.