#ifndef _LADDER_H #define _LADDER_H // skeleton for class Ladder, first written for cps 100e, fall 1996 // modified for CPS 100, spring 1997 // not all member functions are included in the class declaration below // Owen Astrachan // 2/13/96, modified 10/18/96, modified 3/10/97 #include "vector.h" #include "CPstring.h" struct Wnode { string info; // string Wnode * prev; // word before in ladder Wnode(const string & val, Wnode * ptr=0) : info(val), prev(ptr) {} }; class Ladder { public: Ladder(); ~Ladder(); void LoadWords(const string & filename); void Clear(); bool FindLadder(const string & first, const string & last); void PrintLadder(); private: const int INITIAL_SIZE = 100; const int WORD_SIZE = 5; Vector myWords; // stores pointers to words int myWordCount; // # values stored }; #endif