Keypad example compiling error

kindly help me out whenever i compile the keypad library example i t gives error

DynamicKeypad:271: error: redefinition of 'const byte ROWS' DynamicKeypad:84: error: 'const byte ROWS' previously defined here DynamicKeypad:272: error: redefinition of 'const byte COLS' DynamicKeypad:85: error: 'const byte COLS' previously defined here DynamicKeypad:274: error: redefinition of 'char alphaKeys [4][3]' DynamicKeypad:87: error: 'char alphaKeys [4][3]' previously defined here DynamicKeypad:281: error: redefinition of 'char numberKeys [4][3]' DynamicKeypad:94: error: 'char numberKeys [4][3]' previously defined here DynamicKeypad:288: error: redefinition of 'boolean alpha' DynamicKeypad:101: error: 'boolean alpha' previously defined here DynamicKeypad:289: error: redefinition of 'char* keypadMap' DynamicKeypad:102: error: 'char* keypadMap' previously declared here DynamicKeypad:291: error: redefinition of 'byte rowPins [4]' DynamicKeypad:104: error: 'byte rowPins [4]' previously defined here DynamicKeypad:292: error: redefinition of 'byte colPins [3]' DynamicKeypad:105: error: 'byte colPins [3]' previously defined here DynamicKeypad:295: error: redefinition of 'Keypad keypad' DynamicKeypad:108: error: 'Keypad keypad' previously declared here DynamicKeypad:297: error: redefinition of 'long unsigned int startTime' DynamicKeypad:110: error: 'long unsigned int startTime' previously declared here DynamicKeypad:298: error: redefinition of 'const byte ledPin' DynamicKeypad:111: error: 'const byte ledPin' previously defined here DynamicKeypad.cpp: In function 'void setup()': DynamicKeypad:300: error: redefinition of 'void setup()' DynamicKeypad:113: error: 'void setup()' previously defined here DynamicKeypad.cpp: In function 'void loop()': DynamicKeypad:308: error: redefinition of 'void loop()' DynamicKeypad:121: error: 'void loop()' previously defined here DynamicKeypad.cpp: In function 'void keypadEvent(KeypadEvent)': DynamicKeypad:318: error: redefinition of 'void keypadEvent(KeypadEvent)' DynamicKeypad:131: error: 'void keypadEvent(KeypadEvent)' previously defined here

help me

As he are complaining about redefinition, maybe you can have more than one tab opened.

luisilva: As he are complaining about redefinition, maybe you can have more than one tab opened.

There might be a .h or .cpp included without include guards.

If you are asking weather you can have more than one tab, then yes you can: http://arduino.land/FAQ/content/7/42/en/how-to-use-multiple-tabs.html

But I think that is the example completely "fresh". Don't? How can he have changed the example, and come to the forum asking this?

Looks like the entire sketch is duplicated after about line 187. If the .ino file is open in two tabs at once that would cause the problem.

I just had this issue as I made the mistake to make a quick backup copy of my file by duplicating the .ino file within the sketch folder. So yes, removing the backup file out of the sketch folder resolved the issue.