Title. I'm using pragma once in all relevant files but I'm still getting this error. I'd appreciate any help.
Event.h:
//This file is relevant to the others.
#pragma once
enum QueueType {Interactive, Noninteractive};
enum EventType {Start, Core, SSD, TTY};
struct Event {
//Event info
int time;
EventType e;
int PID;
QueueType q;
};
Queue.h:
#pragma once
#include "Event.h"
//Problem code
struct nodeType {
Event info;
nodeType *link;
};
//Everything else in the file is basic Queue functions. Will provide if needed.
PriorityQueue.h:
#pragma once
#include "Event.h"
struct nodeType {
Event info;
nodeType *link;
};
//Also contains Priority Queue functions
main.cpp:
#include <iostream>
#include <string>
#include <assert.h>
#include "Event.h"
#include "Queue.h"
#include "PriorityQueue.h"
using namespace std;
//Also includes some test code
In the implementation files for Queue.h and PriorityQueue.h I use pragma once and include their respective header files as well as iostream and assert. I include using namespace std cause I'm lazy. All the other research I've done seemed to come down to people not using include guards which I don't think is the problem here. Any help would be appreciated.