- //自增和自减指针
- double arr[5] = { 21.1,32.8,45.6,58.6,58.6 };
- double* pt = arr;
- ++pt;
- cout << "data is:" << *pt << endl;
- double x = *++pt;//increment the pointer,take the value
- ++* pt;//increment the pointer to the value
-
- (*pt)++;//increment pointed-to value
- x = *pt++;//dereference original location,the increment pointer