I am having problem with the bolded variables. CLion said that those parameters are never accessed.
When I call the function open_turn, the turn_face, and turn_suit are said that they have not been initialized. But I do not want to initialize those variables by assigning values to them since the values are only determined after the function is called.
How do I pass int turn_card, int turn_f, and int turn_s into the function open_turn? Then assigning value of int turn_card to int turn, int turn_f to int turn_face, and int turn_s to turn_suit?
P/s: At this moment, parameters int turn_f and int turn_s are said to be declared but never accessed.
void open_turn(int current_deck[], int turn_card, int turn_f, int turn_s);
int main() {
int turn;
int turn_face;
int turn_suit;
open_turn(deck, turn, turn_face, turn_suit);
}
void open_turn(int current_deck[], int turn_card, int turn_f, int turn_s) {
turn_card = current_deck[card_idx++];
turn_f = turn_card%13;
turn_s = turn_card/13;