السلام عليكم و رحمة الله,
it is very important for any one who likes programing to know how to do lists and sorting lists
so here is the main class of list:
const int MAX_LENGTH = 50;
typedef int ItemType;
class List // Declares a class data type
{
public: // Public member functions
List(); // constructor
bool IsEmpty () const;
bool IsFull () const;
int Length () const; // Returns length of list
void Insert (ItemType item);
void Delete (ItemType item);
bool IsPresent(ItemType item) const;
void SelSort ();
void Reset ();
ItemType GetNextItem ();
private: // Private data members
int length; // Number of values currently stored
ItemType data[MAX_LENGTH];
int CurrentPos; // Used in iteration
};
تنسيق الكود
to make things more interesting, can any one write me the implementation of this class :) < if not i will put it :unsure: , deal>