I want to pass the size of array, declared inside a function, to the same function. But then I got the warning "expressiong must a constant value". Are there solutions to this problem?
// Draws a sprite in the console using hex-coded sprite with a specific width
void hex_to_sprite(char* hex_number, int width, int size)
{
// hex_number = array of hex-coded sprite
// width = width of sprite you want to draw
// size = length of the hex_number multiplied by 4 (0 = 0000, 1 = 0001, etc.)
char binary_coded_sprite[size] = "";
}
Should I learn dynamic allocation to fight this problem?