Custom variable types in C++
Is there an (easy) way to declare a custom variable in C++? I'm new to the language, but I know how to program in Delphi.
In Delphi, an example would be:
To those unfamiliar with delphi, what the above code does is create a new variable type (called TCard) that can keep any of the values in the brackets, but no others (so in this case it can hold any of the integers 2-10 and the chars A, J, Q and K).
TCard = (A, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K);
Note that i'm not looking for information on how to declare structures or classes, I want a single variable to hold a certain kind of data.
I tried looking for more information on the subject on this forum, the MSVC.NET helpfile and using google, but as I'm not even sure what this is called that didn't give me too much information. :)