fork download
  1. #include <iostream>
  2.  
  3. #define O(EX) cout << #EX << ": " << EX << endl;
  4.  
  5. using namespace std;
  6. int main(){
  7.  
  8. typedef int* iP;
  9.  
  10. //int q=8;
  11. //iP a = &q;
  12.  
  13. // cout << *a;
  14.  
  15. int anArray[10];
  16.  
  17. for (int i=0; i<10; i++){
  18. anArray[i]=i;
  19. }
  20. iP a= anArray;
  21.  
  22. O(*a);
  23. O(*++a);
  24. O(*(a+5));
  25. O(*(a+7));
  26.  
  27.  
  28. return 0;
  29. }
  30.  
Success #stdin #stdout 0s 2724KB
stdin
Standard input is empty
stdout
*a: 0
*++a: 1
*(a+5): 6
*(a+7): 8