Question
Can you please help me with this it's for C++ ! Will give thumbs up! ******* SAMPLE.CPP FILE IS BELOW!!!!! ********* ************************************** SAMPLE.CPP FILE BELOW
Can you please help me with this it's for C++ ! Will give thumbs up! ******* SAMPLE.CPP FILE IS BELOW!!!!! *********
************************************** SAMPLE.CPP FILE BELOW **********************************************
#include
#include "MyString.h"
using namespace std;
int main(){
//(1)
cout
MyString ms_default;
//(2)
cout
MyString ms_parametrized("MyString parametrized constructor!");
//(3)
cout
MyString ms_copy(ms_parametrized);
//(4)
cout
delete expressions"
MyString* ms_Pt = new MyString("MyString to be deleted
");
delete ms_Pt;
ms_Pt = NULL;
//(5),(6)
cout
MyString ms_size_length("Size and length test");
cout
cout
//(7)
cout
MyString ms_toCstring("C-String equivalent successfully obtained!");
cout
//(8)
cout
MyString ms_same1("The same"), ms_same2("The same");
if (ms_same1==ms_same2)
cout
MyString ms_different("The same (NOT)");
if (!(ms_same1==ms_different))
cout
//(9)
cout
MyString ms_assign("MyString before assignment");
cout
ms_assign = MyString("MyString after performing assignment");
cout
//(10)
cout
MyString ms_append1("The first part");
MyString ms_append2(" and the second");
MyString ms_concat = ms_append1+ ms_append2;
cout
//(11)
cout
MyString ms_access("Access successful (NOT)");
ms_access[17] = 0;
//(12)
cout
}
Objectives: The main objectives of this project are to test your ability to create and use dynamic Description: For this project you will create your own String class. You may use square bracket-indexing. pointers, references, all operators, as well as theStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started