Answers for "variably modified ‘_memory’ at file scope"

C
1

variably modified ‘_memory’ at file scope

//test.h
static const int size = 10;
#define GOOD_SIZE 10 // GOOD_SIZE will be replace by 10 during the compilation

typedef struct titi_s {
 	char toto[size]; 		// can't compile because size is a int and you can't have static array with value of variable size
  	char tutu[GOOD_SIZE]; 	// can compile because GOOD_SIZE is not an int
} titi_t;
Posted by: Guest on February-08-2022

Code answers related to "variably modified ‘_memory’ at file scope"

Code answers related to "C"

Browse Popular Code Answers by Language