fork download
  1. #include <iostream>
  2.  
  3. void takeIt(void* arg, int m) {
  4. auto arr = reinterpret_cast<int(*)[m]>(arg);
  5. std::cout << arr[1][2];
  6. }
  7.  
  8. int main() {
  9. int a[3][4] = {0,1,2,3,4,5,6,7,8,9,10,11};
  10. takeIt(reinterpret_cast<void*>(a), 4);
  11. }
Success #stdin #stdout 0s 4396KB
stdin
Standard input is empty
stdout
6