quicksort actually sorts anything you can provide comparsion function for. Look how qsort implemented in C: In takes an array, size of single element and array size (due to not having runtime type information) and pointer to comparsion function.
TL;DR: either use std::string in your struct (so comparsion operators will work) or use strcmp instead of < and >
quicksort can sort any two data types which can be compared with each other.
But in your code you have use the comparison
theEmps[left].lastname < pivot
which won't work . Because the call "theEmps[left].lastname" will give the ASCI of lastname which will be definitely not less than pivot so it wont work that way.