std::sort() is expecting iterators (pointers, kind of) to elements but by a and a you're passing the actual elements.
The first iterator should be to the first element.
The second iterator should be to the imaginary element after the last element.
Here are some ideas how to make it work (as also explained in mutexe's link):
1 2 3 4 5 6
sort(&a, &a + 1); // [address of first] and [address of last] + 1
sort(a, a + 10); // same as above
sort(begin(a), end(a)); // works in C++11 compilers, and for static arrays