c++ error: ‘malloc’ was not declared in this scope

IDE: codeblocks
Error: ‘malloc’ was not declared in this scope when using malloc() in c++
Solutions:
Introducing the stdlib. H

#include<stdlib.h>

Read More: