Answer the question
In order to leave comments, you need to log in
How to understand pointer assignment in C++?
Hey! Explain why two or more are written when assigning a pointer *
. Examples: *(DWORD**)CODE
*(DWORD*)CODE
(DWORD*)CODE
What is the difference between them? After all, according to the assignment rule, the third option is only suitable? But uses all three
Answer the question
In order to leave comments, you need to log in
*(DWORD**)CODE = 0;
- the CODE variable contains the address to a variable of the "pointer to DWORD" type. We go to this address and write NULL there *(DWORD*)CODE = 0;
- the CODE variable contains the address to the "DWORD" type variable. We go to this address and write 0 there (DWORD*)CODE = 0;
- the CODE variable contains the address to the "DWORD" type variable. We assign NULL to the CODE variable itself.
Let's say CODE is a pointer.
int* CODE = new int(5);
int b = *CODE;
cout << b << endl ;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question