QUOTE(Bench @ 6 Dec, 2007 - 05:32 PM)

Well, then worry about the dynamic memory allocation later on - see if you can create your class with a fixed size array to begin with.
Dynamically created arrays are usually those which are created with
new. the syntax goes along the following lines (example - an array of 20 int objects)
CODE
int* my_array = new int[20];
Edit - deletion of the array
must happen using the
delete[] operator.
ok, so I wrote the header file and declared my array as so
[code]
#ifndef TEMPLATE_H
#define TEMPLATE_H
#include<iostream>
#include<string>
template<class T>
class TemplateSet{
public:
TemplateSet();//constructor
TemplateSet(T newValue);
void setValue(T newValue);
T getValue()const;
void getNumberOfItems();
T *array;
private:
T value;
};
#endif;
[\code]
and then just define in my implementation file, correct???