fork download
  1. #include <iostream>
  2. #include <math.h>
  3.  
  4. using namespace std;
  5.  
  6. typedef int Figure;
  7.  
  8.  
  9. Figure (*board_mp)[8];
  10.  
  11. void Swan(Figure flashboard[8][8]) {
  12. board_mp = flashboard;
  13. cout<< "Swan on desck" <<endl;
  14. }
  15.  
  16. int main()
  17. {
  18. Figure arr[8][8];
  19. arr[5][2] = 4;
  20. arr[1][3] = 100;
  21. arr[2][4] = -3;
  22. Swan(arr);
  23. cout << board_mp[2][4] << endl << board_mp[5][2] << endl << board_mp[1][3];
  24. return 0;
  25. }
Success #stdin #stdout 0s 4480KB
stdin
Standard input is empty
stdout
Swan on desck
-3
4
100