You must write a String class that performs some range checking and efficient determination of length, and that provides some other basic String functionality.
Create a directory and download the following files:
mystring.h
mystring.cpp
main.cpp
You will have to fill in some parts in the class String implementation
file mystring.cpp.
These parts are specified in the source code by // Fill in here
comment.
In your implementation of String methods, use the library functions provided by string.h, which operate on arrays of characters terminated by NULL (\0).
g++ -c mystring.cpp g++ -c main.cpp
g++ -o main main.o mystring.o
This page created by Jonathan Alon <jalon@cs.bu.edu>.