Im having some trouble with this concept. I need to make a program that keeps on a asking the user for a string. Takes that string and puts it in a vector of char, the program then needs to check if the word is already contained in that vector and point to that memory location. If anyone could help me out with the algorithm that would be great.
There is the problem to consider - that if more than one pointer points to the same item that was dynamically allocated using new and you delete one of them - it will mess things up for the others.