integer constant does 'not reduce to an integer'
Posted
by Dan Morgan
on Stack Overflow
See other posts from Stack Overflow
or by Dan Morgan
Published on 2009-02-16T20:18:30Z
Indexed on
2010/06/09
8:02 UTC
Read the original article
Hit count: 413
objective-c
I use this code to set my constants
// Constants.h
extern NSInteger const KNameIndex;
// Constants.m
NSInteger const KNameIndex = 0;
And in a switch statement within a file that imports the Constant.h file I have this:
switch (self.sectionFromParentTable) {
case KNameIndex:
self.types = self.facilityTypes;
break;
...
I get error at compile that read this: "error:case label does not reduce to an integer constant"
Any ideas what might be messed up?
© Stack Overflow or respective owner