#include #include void consume_number(int *p) { std::cout << "Consuming: " << *p << std::endl; delete p; } void random_int(int &out) { out = rand(); } void use2() { int i; random_int(i); consume_number(&i); } int main(int argc, char *argv[]) { use2(); }