I have a struct defined like so:
I have void * pointer to bytes of memory being returned by a function. I would like to map the bytes to an array of struct (my struct A) so that I can later loop through and print out the values.
I tried this:
struct A *download=(struct A*) malloc(sizeof(A)*numElements);
download=(struct A*) ft_returning_bytes();
it prints incorrect values which i am not expecting. How can this be done in c++?