Also you probably want to be passing that int there with the & not casting it to a int* and passing it.