fork download
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. cout << "\t 5 Adressen um jeweils 4 Byte hochzaehlen lassen.";
  7. cout << "\n";
  8.  
  9. int Zahl[5];
  10. int *pZahl = Zahl[5];
  11. int a;
  12.  
  13. cout << "Geben Sie fuenf Zahlen ein.\n";
  14. cin >> a;
  15.  
  16. for (int i=0; i<5; i++)
  17. {
  18. cout << "Zahl[" << i << "]:";
  19. cin >> a;
  20. }
  21.  
  22. cout << "Die Adresse der jeweiligen Zahlen lautet wie folgt: \n";
  23.  
  24. for(int i=0; i<5; i++)
  25. {
  26. cout << "Zahl[" << i << "]:" << &Zahl[i] << "\n";
  27. }
  28.  
  29. return 0;
  30. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:10: error: invalid conversion from ‘int’ to ‘int*’
prog.cpp:10: warning: unused variable ‘pZahl’
stdout
Standard output is empty