Hello,
i have to define a string and implement it using a class mystring and dynamic memory allocation for character values. i cannot use the #include <string> definition. It must have these methods:
create a string (obviously)
check if the string is empty
find a given substring in a string
calculate the length of a string
create a substring
read a string form input stream
and finaly, print the string
I also have to write a driver to check and demonstate.
Can someone please help me write the code for this type of program? I would appreciate any help... Thanks a lot!
GOD BLESS AMERICA
i have to define a string and implement it using a class mystring and dynamic memory allocation for character values. i cannot use the #include <string> definition. It must have these methods:
create a string (obviously)
check if the string is empty
find a given substring in a string
calculate the length of a string
create a substring
read a string form input stream
and finaly, print the string
I also have to write a driver to check and demonstate.
Can someone please help me write the code for this type of program? I would appreciate any help... Thanks a lot!
GOD BLESS AMERICA