I have a question in c++ Code: [SIZE=2]Read the following code and answer the question bellow:[/SIZE] [SIZE=2] void main(void)[/SIZE] [SIZE=2] {[/SIZE] [SIZE=2] CMyStr* pStr = new CMyStr();[/SIZE] [SIZE=2] CMyStr* pStr2 = NULL;[/SIZE] [SIZE=2] *pStr = "aba";[/SIZE] [SIZE=2] CMyStr** ppStr = pStr;[/SIZE] [SIZE=2] Print(*ppStr);[/SIZE] [SIZE=2] CMyStr sName("Walla");[/SIZE] [SIZE=2] CMyStr sPosition;[/SIZE] [SIZE=2] sPosition = "1";[/SIZE] [SIZE=2] CMyStr sFull = sName + sPosition;[/SIZE] [SIZE=2] sFull += "2";[/SIZE] [SIZE=2] Print(sFull);[/SIZE] [SIZE=2] if(sFull.Length())[/SIZE] [SIZE=2] Print(sFull[0]);[/SIZE] [SIZE=2] *pStr += sFull;[/SIZE] [SIZE=2] Print(*pStr);[/SIZE] [SIZE=2] }[/SIZE] [SIZE=2]Assume: [/SIZE] [SIZE=2] Print(char* msg) method gets a string pointer and prints it into the screen in a new line.[/SIZE] [SIZE=2] [/SIZE] [SIZE=2]Questions:[/SIZE] [SIZE=2] a. Write the CMyStr class that was used here.[/SIZE] [SIZE=2] b. What does the program output will be?[/SIZE] [SIZE=2] c. Can you think of problems in the code? If you do, please fix.[/SIZE] Thanks, Hanna
I don't see a question, all I see is your assignment. We will not write the code for you. Where is the code for question a? What do you think the output will be? What problems do you see? Jim