I am trying to print the void* memory address inside void**, like this:
#include <stdio.h>
#include <stdlib.h>
int main(){
void** MyArray = malloc(500 * sizeof(void*));
printf("Last pointer: %p\n", *MyArray[499]);
free(MyArray);
return 0;
}
But when i try to compile I get a warning and an error:
- Line: 6 Col: 31 in D:\C\test.c [Warning] dereferencing 'void *' pointer
- Line: 6 Col: 2 in D:\C\test.c [Error] invalid use of void expression
What I'm doing wrong? Thanks