M
Mark Ingram
Hi, does anyone know if it is possible to define the function body of a
getter and setter in the .cpp file?
I have tried this, but it doesn't work (Error 1 error C2039:
'get_VolumeDataList' : is not a member of 'VolumeInfo'
d:\\VolumeInfo.cpp 7)
VolumeInfo.h
property List<VolumeData ^>^ VolumeDataList
{
List<VolumeData ^>^ get();
void set(List<VolumeData ^>^ volumeDataList);
}
VolumeInfo.cpp
List<VolumeData ^>^ VolumeInfo::get_VolumeDataList()
{
return m_volumeDataList;
}
void VolumeInfo::set_VolumeDataList(List<VolumeData ^>^ volumeDataList)
{
m_volumeDataList = volumeDataList;
}
The reason I want to put it in the .cpp file is because I have some
extra error checking that I want to add in, without padding out the
class definition (.h file).
Thanks,
getter and setter in the .cpp file?
I have tried this, but it doesn't work (Error 1 error C2039:
'get_VolumeDataList' : is not a member of 'VolumeInfo'
d:\\VolumeInfo.cpp 7)
VolumeInfo.h
property List<VolumeData ^>^ VolumeDataList
{
List<VolumeData ^>^ get();
void set(List<VolumeData ^>^ volumeDataList);
}
VolumeInfo.cpp
List<VolumeData ^>^ VolumeInfo::get_VolumeDataList()
{
return m_volumeDataList;
}
void VolumeInfo::set_VolumeDataList(List<VolumeData ^>^ volumeDataList)
{
m_volumeDataList = volumeDataList;
}
The reason I want to put it in the .cpp file is because I have some
extra error checking that I want to add in, without padding out the
class definition (.h file).
Thanks,