If this is the original class:
class StorageBin
{
public:
StorageBin();
~StorageBin();
void PutInBin( int Item, int Location);
int ReturnFromBin (int Location);
bool FindInBin(int Item);
void DisplayBin();
private:
int *pBin;
int NumberInBin;
int BinSize;
};
Would this be the correct conversion to make it a template?
Template <class T>
class StorageBin
{
public:
StorageBin();
~StorageBin();
void PutInBin( T Item, T Location);
T ReturnFromBin (T Location);
bool FindInBin(T Item);
void DisplayBin();
private:
int *pBin;
int NumberInBin;
int BinSize;
};
I ask because it compiles correctly, but as I have learned, that is not always the acid test