Well i've made it to the end of my self-taught c++ book and there are a few topics i would like to clear up.
the first one being how to do remove a word from a sentence using arrays.
For example, something like this.
Write a function called deleteit that will delete a word from a sentence.
Please input a sentence: "i really dont like this assignment"
The function should take as arguments 2 arrays of chars. The first array will contain the sentence. The second array will contain the word to be deleted.
please input the word you would like deleted: dont
Print out the sentence when the function returns.
Your sentence was: i really like this assignment
Your function should also return the number of characters deleted if the word was found in the sentence. It should return -1 if the word wasn't found.
I deleted ____ characters from that sentence.
I THINK, THATS WHAT its asking for right?
where do you think the best place is to start on this?
reps for help like always!
thanks


LinkBack URL
About LinkBacks




Reply With Quote



Bookmarks
Algorithms and Data Structures
Java tutorials
Algorithms Forum