fork download
  1. #include <map>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. void test(map<int, double *> &a);
  7.  
  8. int main(){
  9. map<int, double *> a;
  10. test(a);
  11. cout << a[1][1] << endl;
  12. return 0;
  13. }
  14.  
  15. void test(map<int, double*> &a)
  16. {
  17. double red[] = {1.1, 2, 3};
  18. a[1] = red;
  19. }
Success #stdin #stdout 0s 3032KB
stdin
Standard input is empty
stdout
2