4, 5, and 6 are the same thing, only test is a pointer. If you want two pointers, you should use:
int *test, *test2;
Or, even better (to make everything clear):
int* test;
int* test2;
More Related Contents:
- Where ampersand “&” can be put when passing argument by reference?
- How to deal with c-string pointers [closed]
- Why do i have a random result on this template?
- Regular cast vs. static_cast vs. dynamic_cast [duplicate]
- How do I use arrays in C++?
- Is segmentation fault actual undefined behavior when we refer to a non-static data-member
- Differences between unique_ptr and shared_ptr [duplicate]
- How do you pass a member function pointer?
- How to compare pointers?
- How are references implemented internally?
- conversion of 2D array to pointer-to-pointer
- C/C++ int[] vs int* (pointers vs. array notation). What is the difference?
- Why are NULL pointers defined differently in C and C++?
- What happens to the pointer itself after delete? [duplicate]
- Is it legal to compare dangling pointers?
- Why not use pointers for everything in C++?
- What are declarations and declarators and how are their types interpreted by the standard?
- Declaring and initializing a variable in a Conditional or Control statement in C++
- Could I ever want to access the address zero?
- How to make an array with a dynamic size? General usage of dynamic arrays (maybe pointers too)? [closed]
- Dereferencing deleted pointers always result in an Access Violation?
- Difference between const. pointer and reference?
- Is it legal/well-defined C++ to call a non-static method that doesn’t access members through a null pointer?
- Function returning array but main showing garbage [duplicate]
- C++: difference between ampersand “&” and asterisk “*” in function/method declaration?
- dereferencing a pointer when passing by reference
- Is is a good practice to put the definition of C++ classes into the header file?
- difference between pointer to an array and pointer to the first element of an array
- What happen to pointers when vectors need more memory and realocate memory?
- int *array = new int[n]; what is this function actually doing?