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 *
.
Related Posts:
- How to properly malloc for array of struct in C
- Why am I getting this error: “data definition has no type or storage class”?
- Returning an array using C
- What does “request for member ‘*******’ in something not a structure or union” mean?
- Why do I get “cast from pointer to integer of different size” error?
- What does “request for member ‘*******’ in something not a structure or union” mean?
- Initializing array of structures
- Excess elements of scalar initializer for pointer to array of ints
- What exactly is meant by “de-referencing a NULL pointer”?
- Structure padding and packing
- typedef struct pointer definition
- Realloc Invalid Pointer in C
- Why and when to use static structures in C programming?
- error: struct has no member named X
- Constructor for structs in C
- Pointer to 2D arrays in C
- Pointer to a string in C?
- Using pointer to char array, values in that array can be accessed?
- typedef struct vs struct definitions [duplicate]
- Why should we typedef a struct so often in C?
- Arrow operator (->) usage in C
- Why should we typedef a struct so often in C?
- typedef struct vs struct definitions [duplicate]
- Pointer Arithmetic
- dereferencing pointer to incomplete type
- What does “dereferencing” a pointer mean?
- What does “dereferencing” a pointer mean?
- char *array and char array[]
- C pointers and arrays: [Warning] assignment makes pointer from integer without a cast
- “error: assignment to expression with array type error” when I assign a struct field (C)
- What is the difference between const int*, const int * const, and int const *?
- How do you make an array of structs in C?
- What is the difference between const int*, const int * const, and int const *?
- Passing by reference in C
- Map like structure in C: use int and struct to determine a value
- Why does the arrow (->) operator in C exist?
- Difference between a Structure and a Union
- Difference between char* and const char*?
- error: expected primary-expression before ‘)’ token (C)
- What does ** do in C language?
- #31 expression must have integral type
- How do you pass a function as a parameter in C?
- Invalid pointer error on invoking free() after malloc in C
- How to initialize a struct in accordance with C programming language standards
- expression must have integral type
- How do you pass a function as a parameter in C?
- Incompatible implicit declaration of built-in function ‘malloc’
- How to make an array with a dynamic size? General usage of dynamic arrays (maybe pointers too)?
- expression must have integral type
- How do you pass a function as a parameter in C?
- C free(): invalid pointer
- What’s wrong with my code? What is argv[1]?
- Valgrind: Invalid read of size 1
- Constant pointer vs Pointer to constant
- What is the cause of flexible array member not at end of struct error?
- Reversing a string in C
- size of struct in C
- waitpid, wnohang, wuntraced. How do I use these
- Warning: return from incompatible pointer type in C
- How to initialize array to 0 in C?
- Is the sizeof(some pointer) always equal to four?
- How to do scanf for single char in C
- Sign extend a nine-bit number in C
- Break statement not within loop or switch in C
- Cache Simulator in C
- strcmp giving segmentation fault
- C++ Expression must have pointer-to-object type
- C: error: expected ‘)’ before ‘;’ token
- Where is the C auto keyword used?
- make: Nothing to be done for `all’
- Initialization from incompatible pointer type warning when assigning to a pointer
- Typedef function pointer?
- How to printf a memory address in C
- What is the use of intptr_t?
- Data argument not used by format strings in C
- execv vs execvp, why just one of them require the exact file’s path?
- difference between
and - expected expression before ‘{‘ token
- Setting std=c99 flag in GCC
- C Vector/ArrayList/LinkedList
- Convert char array to a int number in C
- Bind failed: Address already in use
- Warning/error “function declaration isn’t a prototype”
- What is the difference between %f and %lf in C?
- warning: initializer element is not computable at load time
- What is stdin in C language?
- How to prevent multiple definitions in C?
- How to pass 2D array (matrix) in a function in C?
- error: ‘for’ loop initial declarations are only allowed in C99 mode [duplicate]
- How can you print multiple variables inside a string using printf?
- c – warning: implicit declaration of function ‘printf’
- Flushing buffers in C
- What are 0x01 and 0x80 representative of in C bitwise operations?
- How to make parent wait for all child processes to finish?
- warning: passing argument ’from incompatible pointer type [enabled by default]’
- Undefined Reference issues using Semaphores
- What is time(NULL) in C?
- Use of cudamalloc(). Why the double pointer?
- C dynamically growing array
- Why should we check WIFEXITED after wait in order to kill child processes in Linux system call?