Sorry, but a small issue. the line: auto card = cards.popBack(); throws the errors: error: variable xxx.card voids have no value error: expression popBack(this.cards) is void and has no value I tried reserving the space, I even tried cards = new Card[no_cards];