#include <iostream>
#include <vector>

int* newInt(int i) {
  int* a = new int{i};
  return a;
}

int main() {
  int* myInt = newInt(5);
  std::cout << *myInt << "\n"; // a was defined in a scope that
                           // no longer exists
  delete myInt;
  return 0;
}