How do I make ptr_1 pointing to the same address of ptr_2 after function_B is called? I tried doing this, but after function_B exits, ptr_1 points back to NULL. Thanks!
Code:void cluster::function_A(void) { int *ptr_1, *ptr_2; ptr_1 = NULL; ptr_2 = new int [ 10 ]; function_B(ptr_1, ptr_2); } void cluster::function_B(int *ptr_1, int *ptr_2) { ptr_1 = ptr_2; }