Previously
for normal char* i used to allocate memory like
char *dce_sTabName = (char *)malloc(strlen(sTabName.c_str())+1);
memset((void *)dce_sTabName,'\0',strlen(sTabName.c_str())+1);
strcpyDCE(dce_sTabName,(char *)sTabName.c_str(),30);
here above 30 is the max size that can be used to copy
Now using std::String class
using just using
std::String dce_sTabName; // declaration
dce_sTabName = sTabName.c_str();
// Here c_str() will append '\0' at the end of dce_sTabName
NO need to mention how many bytes to be copied
Let me know your views on it