i got an issue while add Print class to my library

Hello everybody

good day.
currently i have a problem while implement Print function to my library
here is the code that i've written please take a look.
after add them and run the sketch, it gave me this

sketch_mar19a.ino:3:11: error: cannot declare variable 'lcd' to be of abstract type 'homephone'
In file included from sketch_mar19a.ino:1:0:
C:\Program Files (x86)\Arduino\libraries\homephone/homephone.h:28:7: note: because the following virtual functions are pure within 'homephone':
class homephone:public Print {
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:224,
from C:\Program Files (x86)\Arduino\libraries\homephone/homephone.h:2,
from sketch_mar19a.ino:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:48:20: note: virtual size_t Print::write(uint8_t)
virtual size_t write(uint8_t) = 0;
^
cannot declare variable 'lcd' to be of abstract type 'homephone'

i also refer to this topic with Print class and follow it.
http://playground.arduino.cc/Code/Printclass
here is my code to include my library

#include <homephone.h>

homephone lcd(9,8,7,6,5);

void setup(){

lcd.begin();
lcd.setContrast(0x12);
lcd.display();
lcd.clearDisplay();

pls help me on this issue :frowning:
thank you a lot.

homephone.h (1.69 KB)

homephone.cpp (13.5 KB)

is there anybody can help :slight_smile: :stuck_out_tongue:

	virtual size_t write(const char *str);

The base class defined this as virtual, which means that your class MUST implement it. Why is your class leaving it virtual?

void homephone::write(const char * str)
//basic function to send data from lcdBuffer array to LCD in order to display
void homephone::display(void){

You seem to have forgotten that a function needs a body.

The write() method's return type is NOT void.