Chr*_*_vr 0 c++ struct new-operator dynamic-allocation
我有以下结构
typedef struct DeviceInfo
{
char[30] name;
char[30] serial Number;
}DeviceInfo;
I am doing this
DeviceInfo* m_DeviceInfo = new DeviceInfo[4];
// Populate m_DeviceInfo
Run Code Online (Sandbox Code Playgroud)
然后我想重新调整大小m_DeviceInfo 为6,并希望保留Previous 4 Value.
怎么用c ++做?