Trouble Using Vector
Hi,
I am having trouble trying to make a vector list work. I get an error (E2303 Type name expected)on the line where I declare the vector in the header file.
I would be greatful if anyone could explain why!
cheers Iain
//.h
#ifndef TestH
#define TestH
class TestC
{
private:
int tst;
vector<Test*> *tests;
public:
Patient();
int getTest();
void addInts();
};
//.cpp
#include <system.hpp>
#include <vcl.h>
#include <StrUtils.hpp>
#include <algorithm>
#include <vector>
using namespace std;
#pragma hdrstop
#include "Test.h"
#include "Patient.h"
#pragma package(smart_init)
Patient::Patient()
{
tst = 42;
tests = new vector<Test*>;
}
int Patient::getTest()
{
return tst;
}
void Patient::addInts()
{
ints->insert( ints->end(), 24);
}
|