V
Vince
Hi,
I would like to associate a couple of value(SFID and nRecNo) with a byte
array.
So I tried the following structure :
typedef std::vector<BYTE> ByteArray;
class CardIndex
{
public:
CDataIndex(int nSFID, int nRecNo){ m_nSFID = nSFID; m_nRecNo = nRecNo; }
int m_nSFID;
int m_nRecNo;
};
class CCardData
{
public:
CCardData();
virtual ~CCardData();
private:
int AddTag(int nSFID, int nRecNo);
map<CardIndex, ByteArray> m_FileData;
}
CCardData::AddTag(int nSFID, int nRecNo)
{
m_FileData[new CardIndex(nSFID, nRecNo) ] = new ByteArray
return 0;
}
but it cannot work.
I don't think this structure is good. How would you do it ?
For instance I want ta declare several buffer like this :
I would like to associate a couple of value(SFID and nRecNo) with a byte
array.
So I tried the following structure :
typedef std::vector<BYTE> ByteArray;
class CardIndex
{
public:
CDataIndex(int nSFID, int nRecNo){ m_nSFID = nSFID; m_nRecNo = nRecNo; }
int m_nSFID;
int m_nRecNo;
};
class CCardData
{
public:
CCardData();
virtual ~CCardData();
private:
int AddTag(int nSFID, int nRecNo);
map<CardIndex, ByteArray> m_FileData;
}
CCardData::AddTag(int nSFID, int nRecNo)
{
m_FileData[new CardIndex(nSFID, nRecNo) ] = new ByteArray
return 0;
}
but it cannot work.
I don't think this structure is good. How would you do it ?
For instance I want ta declare several buffer like this :