0

Controller* ctrl = (Controller*)malloc(sizeof(Controller));

  • incompatible implicit declaration of built-in function 'malloc' [enabled by default]
  • implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
    What I'm doing wrong with this malloc?
Matt
  • 484
  • 5
  • 15

1 Answers1

1

Try do add this at the beginning of your file

#include <stdlib.h>
Jabberwocky
  • 48,281
  • 17
  • 65
  • 115