I am working with Visual C++ 6.
I am writing the implementation for a class called List that uses a dynamic array to store numbers. The private variable named data points to the array. I have included code below for a function in the class called attach. This code will take a number from the user(entry in the code example) and will insert it into the list after the cuurent item. The number put into the list with attach becomes the current item in the list. For example if a user input three numbers, it should read like this:
When I do it, the number that I have just entered is garbage(6666.789000e44x). When I put in the next number it becomes garbage and the one that was garbage returns to normal in the list.
Sorry about the confusing explanation, but putting C++ into english is a real art.
Thanks any info; here is the code:
void List::attach(const value_type& entry)
for(i=used; i>(current_index+1); i--)