variable scope in classes

metalmm:
The only issue I appear to still be running into is with the liquidcrystal library and the header file not being able to use lcd.begin (not a type) so now i'm investigating what you said earlier.

something like this:

#include <LiquidCrystal.h>

class Morse
{
  public:
    Morse(int pin);
    void begin();
    void dot();
    void dash();
  private:
    int _pin;
    LiquidCrystal* lcd;
};

Morse::Morse(int pin)
{
  _pin = pin;
}

void Morse::begin()
{
  pinMode(_pin, OUTPUT);
  lcd  = new LiquidCrystal(12, 11, 5, 4, 3, 2);
  lcd->begin(20,4);  //edited for your display size...
  lcd->print("hello, world!");
}

void Morse::dot()
{
  digitalWrite(_pin, HIGH);
  delay(250);
  digitalWrite(_pin, LOW);
  delay(250);  
}

void Morse::dash()
{
  digitalWrite(_pin, HIGH);
  delay(1000);
  digitalWrite(_pin, LOW);
  delay(250);
}

Morse myObject(13);

void setup() 
{
  myObject.begin();
}

void loop() 
{
  myObject.dot(); myObject.dot(); myObject.dot();
  myObject.dash(); myObject.dash(); myObject.dash();
  myObject.dot(); myObject.dot(); myObject.dot();
  delay(3000);
}