fork download
  1. #include <vector>
  2. using namespace std;
  3.  
  4. vector<int> vec = {1, 2, 3};
  5.  
  6. vector<int>* getVec() {
  7. return &vec;
  8. }
  9.  
  10. int main() {
  11. getVec()->at(1);
  12. getVec()->operator[](1);
  13. (*getVec())[1];
  14. return 0;
  15. }
Success #stdin #stdout 0s 2980KB
stdin
Standard input is empty
stdout
Standard output is empty