Re: simple binary search program and gdb, plz help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux