Here is simple Digital Clock coded in C++ and compiler used is TurboC.
A class DIGIT is designed to draw digits. Follwoing are the details for this class:
Consructor: DIDGT(); for default settings
DIGITE(int s,int c,int st); for user define settings
s -> is size of the digit
c -> color of the digit
st -> fill style of the digit
Methods: void DIGITE::DrawDig(int x,int y,int n)
x,y -> x and y coordinates of the screen
n -> interge value (<10) to be display
void DIGITE::PutDig(int x,int y,int n)
x,y -> x and y coordinates of the screen
n -> interge value (<100) to be display
void DIGITE::MakeBars()
internal function used to draw horizontal and vertical bars for the digits in the memory.
thats it!