Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Can I use classes with arrays?

Im trying to make a card game, and I need to make cards with a number and a color. I was thinking about making a card class and adding an instance of the class for any card.

The problem is that I would need to automatically change the card's name (I don't care about the name I just need to change it ) and to put every card in an array. Is it possible in anyway?

Answers

  • You can make an array and then add it to a class but make sure why are you using that array in order to Make a global variable

Sign In or Register to comment.