fork download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. vector<float *> ft = { new float[1], new float[1], new float[1] };
  9.  
  10. for(int i = 0; i < 3; i++) {
  11. float *p = ft[i];
  12. *p = i;
  13. }
  14. cout << *ft[1];
  15. for(int i = 0; i < 3; i++) {
  16. delete [] ft[i];
  17. }
  18. }
  19.  
  20.  
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
1