can we use integer pointer to store the return type of lower_bound() method instead of auto or is it a different datatype ?
int *ptr = lower_bound(arr,arr+6,5)
can i use it this way?
can we use integer pointer to store the return type of lower_bound() method instead of auto or is it a different datatype ?
int *ptr = lower_bound(arr,arr+6,5)
can i use it this way?
No this will work only for arrays
not for vector and other containers
check out this code