I am using eclipse debugger , I added some variables to the watch to check how they change through the code , the problem is I want to see these variables as the enum values I gave to them in the code and not the int value ? thanks for helping
how I view the enum value of a watch expression instead of the real value in eclipse debugger C/C++?
            Asked
            
        
        
            Active
            
        
            Viewed 1,160 times
        
    1 Answers
0
            
            
        so let's say you have
enum myEnum {
    TheFirst=0, TheSecond=10
};
and now you want to see the name instead of the value (eg. TheFirst instead of 0)? I don't think that's possible because in c++ enums are resolved at compile-time which means the "names" are non-existent at runtime. That makes it indistinguishable from a normal int.
related Question on SO: https://stackoverflow.com/a/9150550/3611557
 
    
    
        Community
        
- 1
- 1
 
    
    
        user3611557
        
- 21
- 6
- 
                    yes this is exactly what i want , but I am coding C not C++... the only reason i wrote c++ is because I think its sthg about the editor and not the compiler . thanks anyway – yaboty May 23 '14 at 13:23
