I just started to learning how to use classes and specification files. For some reason i keep getting an error saying `length' undeclared (first use this function)
#include <iostream>
#include <fstream>
#include <string>
#include <cctype>
using namespace std;
const int MAXSIZE = 50;
typedef string ItemType;
class List
{
public:
List();
private:
int length;
int currentPos;
ItemType data[MAXSIZE];
};
//--------------------------------------------------------------------------------------------------------
#include "List.h"
List::List()
{
length = 0; // this is where the error points to
currentPos = 0;
}