I posted this question before: Compiler Can't Find My Header?
I fixed the problem with including locker.h, but now I seem to be having trouble with my other header, SelfStorageList.h. I'm POSITIVE all files are in the same folder (within the Projects -> myfile folder in Visual Studio 2012) and I have checked their paths.
Here is the code that gives my issue:
#include "Locker.h"
#include "SelfStorageList.h"
void rentLocker(Locker e) {
if (isEmpty()) { //Issue here
}
}
The isEmpty() call is said to not be defined. It is defined here, in SelfStorageList.h:
#pragma once
#include <string>
#include <cstdlib>
#include "Locker.h"
using namespace std;
class LockerNode{
public:
Locker objLocker;
LockerNode *next;
LockerNode(){
next=0;
};
LockerNode(Locker e, LockerNode *ptr=0){
objLocker=e;
next=ptr;
}
};
class SelfStorageList
{
private:
LockerNode *head, *tail;
public:
SelfStorageList(){
head=tail=0;
}
LockerNode* getHead(){
return head;
}
LockerNode* getTail(){
return tail;
}
void rentLocker(Locker e);
void dispLockers(bool vipOnly=0);
bool isEmpty(){
return head==0;
}
};
I've included the rest of the functions, since trial testing seems to indicate that it has no knowledge of the head and tail pointers either. Anyone have any idea why I'm having such difficulty including my headers? I reiterate that they are definitely all in the same, correct folder.
Here is a further screenshot, if it helps: