[lug] O-Topic need C++ help......

John Starkey jstarkey at polaris.umuc.edu
Fri Apr 7 20:44:25 MDT 2000


Yea I fixed it by eating \n......

As far as using a real database. If I do that how will I learn C++??? Know
of a better project???? I can't stick to the book. Now I just can't stop
it from scrolling to eternity when I get past the char cins. It's like I
put a paper weight on the enter button. It's hell being one of those
people that gotta learn it themselves. 

I'm taking a C++ intro course and I'm a couple chapters ahead
now, and that stuff is working but suddenly I'm having problems with get()
and that was way back there.

So anyway. Since this is so off topic I'm gonna start another thread with
the question of........ "Will they hire you in the UNIX realm without a
CIS degree????". 

Thanks again,

John

On 7 Apr 2000, Tkil wrote:

> 
> 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.
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> 





More information about the LUG mailing list