[lug] O-Topic need C++ help......
Tkil
tkil at scrye.com
Fri Apr 7 19:53:26 MDT 2000
i don't have the time to check my references right now, but i beleve
that "getline" does not actually remove the trailing '\n' from the
input. so the next time you call it, it just immediately returns.
fixes include eating whitespace after a getline, or at least reading a
single character to get the \n off the input stream. this problem (if
it is what is causing your woes) is not specific to C++; i used to
encounter it quite often in C, as well.
if you are doing database stuff, however, why not just use a Real
Database? they are available for free, and are much easier to setup
than trying to do your own. just a suggestion.
and if you don't already have stroustrup's 3rd ed, get it. no serious
c++ programmer should be without it (unless they were on the standards
committee or building a compiler, in which case i'll just slink away
and let them have fun with the standards documents...)
hth,
t.
More information about the LUG
mailing list