Matrix keypad compiling errors?

Here's the code:

#include <Keypad.h>
#include <Password.h>
#include <BombDisplay.h>

BombDisplay bdisplay;
Password password = Password( "2158" );

const byte ROWS = 4; // Four rows
const byte COLS = 3; //  columns
// Define the Keymap
char keys[ROWS][COLS] = {
  {'1','2','3'},
  {'4','5','6'},
  {'7','8','9'},
  {'*','0','#'}
};
// Connect keypad ROW0, ROW1, ROW2 and ROW3 to these Arduino pins.
byte rowPins[ROWS] = { 5, 4, 3, 2 };// Connect keypad COL0, COL1 and COL2 to these Arduino pins.
byte colPins[COLS] = { 8, 7, 6 };


// Create the Keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
unsigned long mycounter = 0;
long n = 1000;
int count=5;
int latch = 0;
void setup()
{
  keypad.addEventListener(keypadEvent);
}

void loop()
{
  if(digitalRead(7) == HIGH)
  {
    keypad.getKey();
if(millis()-mycounter > n){
   mycounter = millis();
   if(count == 0){
     bdisplay.clearDisplay();
     bdisplay.displayOne(0);
   } else {
   bdisplay.clearDisplay();
   bdisplay.displayOne(count);
   count--;
  }
}
}
}

void keypadEvent(KeypadEvent eKey){
  switch (keypad.getState()){
    case PRESSED:
        switch (eKey){
          case '*': checkPassword(); break;
          case '#': password.reset(); break;
          default: password.append(eKey);
        }
  }
}

void checkPassword(){
  if (password.evaluate()){
    setup();
    return;
  }else{
  }
}

and here's the error:

In file included from BOMB_WITHOUT_KEYPAD.cpp:1:
C:\Users\Lucia\Desktop\arduino-1.0.1\libraries\Keypad/Keypad.h:50: error: 'byte' does not name a type
C:\Users\Lucia\Desktop\arduino-1.0.1\libraries\Keypad/Keypad.h:51: error: 'byte' does not name a type
C:\Users\Lucia\Desktop\arduino-1.0.1\libraries\Keypad/Keypad.h:63: error: 'byte' has not been declared
C:\Users\Lucia\Desktop\arduino-1.0.1\libraries\Keypad/Keypad.h:63: error: 'byte' has not been declared
C:\Users\Lucia\Desktop\arduino-1.0.1\libraries\Keypad/Keypad.h:63: error: 'byte' has not been declared
C:\Users\Lucia\Desktop\arduino-1.0.1\libraries\Keypad/Keypad.h:63: error: 'byte' has not been declared
C:\Users\Lucia\Desktop\arduino-1.0.1\libraries\Keypad/Keypad.h:78: error: ISO C++ forbids declaration of 'byte' with no type
C:\Users\Lucia\Desktop\arduino-1.0.1\libraries\Keypad/Keypad.h:78: error: expected ';' before '' token
C:\Users\Lucia\Desktop\arduino-1.0.1\libraries\Keypad/Keypad.h:79: error: ISO C++ forbids declaration of 'byte' with no type
C:\Users\Lucia\Desktop\arduino-1.0.1\libraries\Keypad/Keypad.h:79: error: expected ';' before '
' token
In file included from BOMB_WITHOUT_KEYPAD.cpp:2:
C:\Users\Lucia\Desktop\arduino-1.0.1\libraries\Password/Password.h:61: error: 'byte' does not name a type
BOMB_WITHOUT_KEYPAD:22: error: no matching function for call to 'Keypad::Keypad(char*, byte [4], byte [3], const byte&, const byte&)'
C:\Users\Lucia\Desktop\arduino-1.0.1\libraries\Keypad/Keypad.h:63: note: candidates are: Keypad::Keypad(char*, int*, int*, int, int)
C:\Users\Lucia\Desktop\arduino-1.0.1\libraries\Keypad/Keypad.h:57: note: Keypad::Keypad(const Keypad&)

It looks like there is something wrong with the keypad library.

It looks like there is something wrong with the keypad library.

The last few messages imply that the problem is the way that you are calling it.

Which version of the IDE are you using? Where did you get the Keypad library?

I am using Arduino IDE version 1.0.1, and I got the library from this Bildr tutorial: http://bildr.org/2011/05/arduino-keypad/

Check to make sure that you do not have two versions of the Keypad library.

No, I only have one.

That library has this in it:

#include <WProgram.h>

Read this before posting a programming question

Point 2.

Actually the library has this in it:

// Arduino versioning.
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif

I followed the link that was provided and the tutorial provides a link to the library on the Playground. The compiler should be picking up Arduino.h and not WProgram.h since the IDE version being used is 1.0.1.

But I still can't see why byte is undefined unless the compiler is picking up WProgram.h.

mstanley:
Actually the library has this in it:

// Arduino versioning.

#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif

Not on the page you linked above:

Perhaps if you give the exact link to the exact library you are using. Not just "a link to the library on the Playground". After all, there are lots of links on the Playground.

Yeah, I see that now. I thought that code listing was just an image. I found the link to both libraries in the 'Code' paragraph:
Password libraries - http://www.arduino.cc/playground/Code/Password
Keypad - http://www.arduino.cc/playground/Code/Keypad

Perhaps if you give the exact link to the exact library you are using. Not just "a link to the library on the Playground". After all, there are lots of links on the Playground.

You're right. And normally I would have but I've been rewriting the Keypad library and helping G. D. (Joe) Young add I2C support. It's going to take a couple of weeks before I can learn to interact with humans again.