解决1
c++中使用malloc()时,出现error: 'malloc' was not declared in this scope
解决方法:
引入stdlib.h #include<stdlib.h>