我试图了解指针是如何工作的,但我不知道如何使用仅指向第一个元素的指针来访问所有数组
int myArray[10];
for(int i=0; i<10; i++)
{
myArray[i] = 11*i;
}
int *p;
p = myArray;
//Now how do I access the complete array using the variable p
cout<<*p; //This only prints the first value, how to print all the values