Main.cc: In function ‘int main()’: Main.cc:22:10: error: invalid operands of types ‘double [1000005]’ and ‘double’ to binary ‘operator+’ sort(a,a+n); ~^~