Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setChar(char* type)
- {
- delete[] this->type;
- if (type != nullptr)
- {
- this->type = new char[strlen(type) + 1];
- for (int i = 0; type[i]!='\0'; i++)
- {
- this->type[i] = type[i];
- }
- this->type[strlen(type)] = '\0';
- }
- else { this->type = nullptr; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement