Considering example i used. If i copy pointer like this then it is a shallow copy. whereas i asked how to do deep copy here.
now considering "d.dataPtr" as a non pointer and dataPtr as pointer, have you shared above example to do deep copy?Code:exportData::exportData(const exportData& d):a(d.a),c(d.c){ strcpy(b, d.b); dataPtr = d.dataPtr; }