Cathcart, Charles Allan, 1759-1788, army officer and diplomat