Write the definitions of member functions

Given a class String that has the data
members int length_; and char* str_;.

I want to write the definitions of the following two member functions:


int String::firstOccurenceIndex(char arg)
which returns the index of the _rst occurrence of its char argument (i.e., arg) in the receiver.

and

bool String::isSubstring(String s1)
which returns "true" or "false" depending on whether the input s1 is a substring of the receiver.

I am new to programming, any help will be appreciated. Thanks
Topic archived. No new replies allowed.