I need some help with my code - I've been trying to figure this out for hours. So I have a static int in my .h class, and I'm using a template<typename TItem> so that my code is parameterizable. I keep getting an error telling me that I'm supposed to have an unqualified id. Here's the relevant portion of my code:
//Node.cpp
#include <string>
#include "Node.h"
template <typename TItem> Node<TItem>::Node(){
next = NULL;
prev = NULL;
items = new TItem[capacity];
numItems = 0;
}
//That was my .cpp file. Here's my .h file
/Node.h
#pragma once
#include <string>
#include "Student.h"
using std::string;
template <typename TItem>
class Node{
staticint capacity;
private:
Node* next;
Node* prev;
TItem* items;
int numItems;
//etc.