This is the header file for a link list, when i try to compile this, it produces an error stating "string is not included"Code:#ifndef LINES_H_INCLUDED #define LINES_H_INCLUDED #include <string> /** @file Lines.h */ typedef string ListItemType; /** class Lines*/ class Lines { private: /** A node in the list*/ struct Node { ListItemType item; Node *next; int lines; }; Node *head; public: /** Default Constructor*/ Lines(); /** Copy Constructor* * @param line = The list to copy*/ Lines(const Lines& line); /** Destructor */ ~Lines(); //List operations void insert(int index, const ListItemType& newItem); void remove(int index); void copy(int index, ListItemType& dataItem) const; void cut(int index,ListItemType& dataItem); }; #endif // LINES_H_INCLUDED
when i change the string to => typedef char ListItemType
there's no problem...