"eric lin" <ericlin@xxxxxxxxxxxxx> writes: > I copy a piece of simple code from c++ book (practical c++ programing) , page 296, chapter Debugging and optimation > with input also according its indicated , increasing in order in numbers.dat (page 289) file This mailing list does not exist to help you learn how to program. Sorry. > std::sscanf(line, "0", &data[max_count]); This line looks wrong to me. I recommend that you take basic debugging steps like adding some print statements to verify that the array is what you expect, or run the program under a debugger. Ian