int array[5]; cout << sizeof(array) // prints 5*sizeof(int) onto the console
but...
int *array = new int[5];
cout << sizeof(array) // prints the same constant number always irrespective of what I enter in
the brackets .... int[ any size ]
What is exactly happening here??? pls somebody help
I figured out this strange behaviour while i was trying to sort a dynamic array using std::sort std::sort(array, array+sizeof(array)/sizeof(array[0]));