Well, when I run the code, everything goes fine and I can create the array..
But the statement : "\nMaximum element in the array is:"<<maximum(p,size);
is not being printed means there is some problem with the maximum function which I am unable to find out.