I right now am making a multithreading library for lua, and everything would compile if there weren't this strange problem. I have a container object for holding the thread object class I created. Here is the header for this object:
#include "stdafx.h"
;
using namespace std;
class LuaThreadManager {
public:
LuaThreadManager(int size);
Thread& get(int id);
int add(Thread& t);
void remove(int id);
protected:
vector <Thread&> T;
int numoccupied;
}
When I compile, I get three errors from this header(I will note that they are all at the line where I declare my header):
Line 12: error C2143: syntax error : missing ';' before '<'
Line 12: error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Line (12): error C2238: unexpected token(s) preceding ';'
And here is my question: what the heck am I doing wrong? (Also, you will see the identifier Thread in the vector declaration; it is my thread object I created) EDIT: All of the answers I have been given haven't worked. It isn't because I didn't include the vector library(I DID include it via including it in stdafx.h_, or because I am using references for the vector (fixed that, didn't fix my errors).