Because you’re passing the value of the pointer to the method and then dereferencing it to get the integer that is pointed to.
Related Posts:
- Arrow operator (->) usage in C
- Why does the arrow (->) operator in C exist?
- expression must have integral type
- How to printf a memory address in C
- How to convert const char* to char* in C?
- Invalid type argument of -> C structs
- What does ** mean in C?
- Get size of pointer in C
- C: pointer to array of pointers to structures (allocation/deallocation issues)
- Casting a pointer to an int
- Initialization makes pointer from integer without a cast – C
- lvalue required as left operand of assignment error when using C++
- What exactly is the difference between “pass by reference” in C and in C++?
- Pointer Arithmetic
- What does “dereferencing” a pointer mean?
- What does “dereferencing” a pointer mean?
- char *array and char array[]
- Are the C++ & and * operators inverses in all contexts?
- C pointers and arrays: [Warning] assignment makes pointer from integer without a cast
- What is the difference between const int*, const int * const, and int const *?
- how does the ampersand(&) sign work in c++?
- What is the difference between const int*, const int * const, and int const *?
- Difference between char* and const char*?
- What does ** do in C language?
- What’s the difference between char and char* in C++?
- #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
- When should I use the new keyword in C++?
- expression must have integral type
- How do you pass a function as a parameter in C?
- How to make an array with a dynamic size? General usage of dynamic arrays (maybe pointers too)?
- 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
- Reversing a string in C
- Passing an array by reference in C?
- Warning: return from incompatible pointer type in C
- Is the sizeof(some pointer) always equal to four?
- Warning: assignment from incompatible pointer type
- strcmp giving segmentation fault
- Why am I getting this error: “data definition has no type or storage class”?
- Initialization from incompatible pointer type warning when assigning to a pointer
- Typedef function pointer?
- What is the use of intptr_t?
- Returning an array using C
- warning: passing argument ’from incompatible pointer type [enabled by default]’
- char pointers: invalid conversion from ‘char*’ to ‘char’?
- What is the difference between char array and char pointer in C?
- Why do I get “cast from pointer to integer of different size” error?
- Why use pointers?
- What’s the difference between * and & in C?
- C++ pass an array by reference
- Excess elements of scalar initializer for pointer to array of ints
- What exactly is meant by “de-referencing a NULL pointer”?
- typedef struct pointer definition
- Difference between char *argv[] and char **argv for the second argument to main()
- Difference between char* and char** (in C)
- Warning: comparison of distinct pointer types
- Realloc Invalid Pointer in C
- Dereference void pointer
- The difference between char * and char[] [duplicate]
- Difference between function arguments declared with & and * in C++
- What does ‘return *this’ mean in C++?
- Difference between the int * i and int** i
- Pointer to 2D arrays in C
- Pointer to a string in C?
- Using pointer to char array, values in that array can be accessed?
- C – Error is “free(): invalid next size (normal) “
- Meaning of *& and **& in C++
- lvalue required as increment operand
- How to use execvp()
- Undefined reference to pthread_create
- What is Bit Masking?
- What is uintptr_t data type
- How do I use extern to share variables between source files?
- Cannot assign requested address – possible causes?
- Does connect() block for TCP socket?
- Converting a C program to MIPS
- C: linker command failed with exit code 1
- What’s the equivalent of new/delete of C++ in C?
- Array definition – Expression must have a constant value
- Variable warning set but not used
- Sorting Linked List C++ with pointers
- Expected declaration specifier error in function
- error: ‘for’ loop initial declarations are only allowed in C99 mode [duplicate]
- c – warning: implicit declaration of function ‘printf’
- error: aggregate value used where an integer was expected
- Implementing shell in C and need help handling input/output redirection
- Implementation of multiple pipes in C
- What does the term “empty loop” refer to exactly in C and C++?
- error: function returns address of local variable
- Parameter name omitted error?
- Character constant too long for its type
- Invalid write of size 1
- How to solve static declaration follows non-static declaration in GCC C code?
- realloc(): invalid next size when reallocating to make space for strcat on char *
- gdb: No symbol “i” in current context