So yeah, as alot of you will know Im Currently Learning C++ and I have come to my first problem out of many that will come.
That is: How do I check the type of a C++ data type variable?
SubZeroChaos
ID:182308
![]() Aug 27 2008, 7:17 am
|
|
![]() Aug 27 2008, 7:39 am
|
|
typeof is provided by the GNU Compiler Set. As for Microsoft C ... *shrug*.
|
SubZeroChaos wrote:
So yeah, as alot of you will know Im Currently Learning C++ and I have come to my first problem out of many that will come. Short answer, you really should not. Types and Classes are hard-coded in. Compiled. And they are generally not needed at runtime. Example: class MyClass; If you tell me exactly what you are trying to accomplish than I will be able to help you out more. George Gough [Edit] I realized my explanation sounded like crap. So I made it different and hopefully better. |
If you design your classes and such correctly there should be little to no need for typeof.
George Gough |
Agreed, it's not a C++ standard either, which means plenty of "bugger" moments when attempting to use it on Microsoft C, Borland C etc etc.
|