Hey all!
I've just recently learned how to use classes. To learn how to use 'classes' I've created a program that reads numbers from a file and stores them into 2 arrays. I dynamically allocated an array and have been using the same .txt file to test my work. After just now trying to use another txt file... It was reading in the same amount of lines as the previous file had. No matter how many lines I add or delete.... it keeps telling me that there are 4 lines of data that was read in. Any idea why this is happening?
I usually delete allocated memory if there's a greater than 50:50 probability that I won't need it again, but that's me. I'd expect that some people keep it to the end if they know there's a good chance they [edit] will not [/edit] need it again and others delete it as soon as it's not needed even if they will need it a second later.