Pages: [1]   Go Down
Author Topic: Make a class with GLCD libary  (Read 362 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi:
I'm trying to make a class called CDisplay that show the text into ks0108 display so i have this class
CDisplay.h
Code:
#ifndef CDisplay_h
#define CDisplay_h
#include <WProgram.h>
#include <GLCD.h>
class CDisplay{
   public:
     CDisplay();
     ~CDisplay();
   private:
     GLCD _glcd;
};
#endif
and CDisplay.cpp
Code:
#include <WProgram.h>
#include <GLCD.h>
#include "CDisplay.h"
CDisplay::CDisplay(){
 
}

CDisplay::~CDisplay(){ 
}
but i got an error like "GLCD does not name a type"
so what am i doing wrong please
Logged

North Queensland, Australia
Offline Offline
Edison Member
*
Karma: 66
Posts: 2117
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
GLCD _glcd;

Use 'glcd' instead, the library declares GLCD as this: extern glcd GLCD; so its a variable not a type.
Logged


Dallas, TX USA
Online Online
Faraday Member
**
Karma: 63
Posts: 2648
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You haven't said what library are you using.
I can't tell based on the header you are including
as I'm not familiar with a ks0108 library uses a header named
GLCD.h

--- bill
Logged

Pages: [1]   Go Up
Jump to: