fork download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. vector<double> arr = { 1e-1, 1e0, 1e1 };
  9. double *ptr = arr.data() + 2;
  10.  
  11. cout << arr[1] - *ptr;
  12. }
  13.  
  14.  
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
-9