由买买提看人间百态

topics

全部话题 - 话题: extrainfo
(共0页)
d*******n
发帖数: 369
1
1.
#include
class ExtraInfo
{
...
};
class ExtraInfoString : public std::string
{
ExtraInfo *mExtraInfo;
public:
inline ExtraInfoString() : mExtraInfo(new ExtraInfo())
{
}
inline ~ExtraInfoString()
{
delete mExtraInfo;
mExtraInfo = 0;
}
inline ExtraInfo *GetExtraInfo()
{
return mExtraInfo;
}
inline const ExtraInfo *GetExtraInfo() const
{
return mExtraInfo;
}
};
void main()
{
std::string *s = new E
(共0页)