KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have the following class: public class Card { public enum Suit { SPACES, HEARTS, DIAMONDS, CLUBS }; public Card(Suit nsuit, int nrank) { suit = nsuit; rank = nrank; } private Suit suit; private int rank; } I want to instantiate it in another class, but that class doesn't understand the Suit enum. Where should I put the enum to make it publicly visible?
Tags (comma-separated)
Save Edits
Cancel