What are pointers parameters in functions for?

So I know you can use this in examples like

1
2
3
4
void changeInt(int &i)
{
	i += 5;
}

and than if you have an integer you can add 5 to its value automatically like

1
2
int value = 10;
changeInt(10);


Now value would be 15. What I don't understand if many times I've seen cases where they aren't just changing the value but somehow allocate a new amount of data dynamic memory wise with something like


1
2
3
4
void someFunc(int* value)
{
  //something happens here
}


and something else I don't understand is when this has NO NAME for example:

1
2
3
4
void someFunc(*int)
{
  //something happens here
}



That makes no sense to me. Can someone kindly explain this? Thank you guys so much!!
Topic archived. No new replies allowed.