Double-charm and hidden-charm hexaquark states under the complex scaling method