I have a variable called myVar
so i declared and initialised it.
Now, I would like to create a pointer pointing to myVarCode:int myVar;
What should i do?
1. int* myPtr = &myVar;
OR
2. void* myPtr = &myVar;
What is the difference between void* and int*? does it depend on what it is pointing to?
For example, if the pointer is pointing to an int, it has to be declared using int*.