I'm wondering how can I get variable length word with fscanf :
I was doing something like :
char w[WORD_LENGTH_MAX + 1];
fscanf(f1, "%" XSTR(WORD_LENGTH_MAX) "s", w);
but can't use preprocessor anymore because I want WORD_LENGTH_MAX to be variable, actually coming from argv. Now I have something like this :
length = argv[0];
w[length + 1];
fscanf(f1, "%" ???length??? "s", w);
but don't know how to make this to work