This function returns a pointer to variable something.
int something (int* pointer)
This function returns a value to variable something.
typically people returns pointers to functions for better performance, however, for int types, that's no big deal 'cause the overhead cost is minor but when you're working with user-defined types or even string objects it's best to return a pointer or reference to avoid copying all the elements you're passing, get it?
I kinda undrestand. I am learning from book jumping into c++ but since I am not native english speaker It is harder to understand everything. Is it possible that you make 2 short examples? // how I understand;
1 2 3 4 5
int *returnPOINTER (int *pointer)
{
int *pointer += 50;
return pointer;
}
this is going to return pointer + its going to be faster?
the one with without pointer, int something (*pointer), will be slower + you re returning value?