fork download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. vector<char> text(5);
  9.  
  10. char *chr1 = text.data() + 2, *chr2 = chr1 + 2;
  11. cout << chr2 - text.data();
  12. }
  13.  
  14.  
Success #stdin #stdout 0.01s 5252KB
stdin
Standard input is empty
stdout
4