#include #include using namespace std; int foo(int* a, int* & b){ a = new int; *a = 25; b = new int; *b = 30; return *a + *b; } int main(){ int *i, *j; int x = foo(i, j); cout << x << " " << *i << endl; cout << *j << endl; return EXIT_SUCCESS; }