Need Help On Enums
Hi all,
I m a newbie to programming. I was working on Enums in C++. I was not able to copy enum of one class to enum of another class. please help me on this issue. |
We cannot see such a problem without seeing it. Please post code you have so far.
|
Hi -
In C++, every different enum you define is literally a different "type". So it makes sense that you wouldn't be able to copy directly from one "type" (one enum in one class) to another (a different enum in a different class) without casting. This is somewhat different from "C" enums (which lets you more or less freely interchange different enums). Here is some more information on the subject: http://en.wikipedia.org/wiki/Enumerated_type 'Hope that helps .. PSM PS: If my hunch about your real question is incorrect, or if you have further questions, please follow HKo's advice and post sample code illustrating the problem. It definitely helps ;-) |
All times are GMT -5. The time now is 10:33 AM. |