I am not sure what the 'unresolved external error' is from. The compiler should list a specific name for the error. Could be that you are missing a library file. Maybe try changing your main() to return an int value.
Code:
int main()
{
/* ..... code ....*/
return 0;
}
Also, your program may compile but it is not going to run anyway. You are attempting to assign a constant value to a dereferenced pointer that has not been assigned any memory. You will have to change you code to look something like this:
Code:
#include <stdio.h>
#include <malloc.h>
//pointer has pointers
int main()
{
struct int_pointers
{
int *ptr1, *ptr2;
};
struct int_pointers *point, ptrs; //create 2 objects.
point = &ptrs;
int i1 = 123, i2 = 87, i3 = 45;
(*point).ptr1 = (int *)malloc(sizeof(int));
*(*point).ptr1 = 12; //dereference point and use dot notation
point->ptr2 = &i2; //pointer points pointer
printf("i1 = %d, point->ptr1 = %d\n", i1, *(*point).ptr1); //12
printf("i2 = %d, point->ptr2 = %d\n", i2, *point->ptr2); //87
free ((*point).ptr1);
return 0;
}
David