When is totalsize every set to -1? In other words, when do you stop attempting to read from inFile and when does count, and more importantly cnt (that indexes into tmp) stop being incremented?
Speaking of tmp, do you see that it's just large enough for 1 element?
know, i didnt know tmp could hold only one element and -1 is the sentinel value. This is my first class using c++ and it is rather confusing to me but im gradually learning. What do you suggest i do to help solve my problem