Warning: assignment from incompatible pointer type

myPage and struct myPage are different types. You could make them the same type by changing the struct definition to:

typedef struct myPage {
    int pageNum;
} myPage;

or you could just use myPage * instead of struct myPage *.

Leave a Comment