我在第5行的错误中遇到了以下代码的问题:
错误:无效转换
void*为char*
我正在使用g ++和codeblocks,我试图将此文件编译为cpp文件.有关系吗?
#include <openssl/crypto.h>
int main()
{
char *foo = malloc(1);
if (!foo) {
printf("malloc()");
exit(1);
}
OPENSSL_cleanse(foo, 1);
printf("cleaned one byte\n");
OPENSSL_cleanse(foo, 0);
printf("cleaned zero bytes\n");
}
Run Code Online (Sandbox Code Playgroud)