[gameprogrammer] Re: Simple C++ Program

  • From: "storm3" <storm3@xxxxxxxxxxx>
  • To: <gameprogrammer@xxxxxxxxxxxxx>
  • Date: Wed, 11 Oct 2006 23:12:42 -0500

I agree, 

I ran into this very same issue, a long, long time ago, when I was first
learning C & C++, the solution I came upon back then was to use a
flushbuffer function, can't remember the exact command now, I would simply
use it at the end of the input routine, to ensure there were no left over
remnants.  Check into it, I believe it was a Microsoft command, not sure if
they dropped it or not in their later compilers, this was after all, back in
the quick C & Microsoft C++ 5 or something like that, can't remember for
sure, I know I was also using Borlands Turbo C++ 3.0 at the time, at least
for me, Quick C & Turbo C++ combined, along with a docked laptop, a desk
with plenty of room for my book, the BEST book imho, Sams - Teach yourself C
in 21 Days, now there have been several newer versions of this same book,
not sure if it is as good though, the thing that put this book in the winner
category, is the fact it got you up and running with concepts quickly, had
you write small apps, which increased in size as you went, and then the
quizzes at the end of each chapter, which required you to not just copy what
they done during the chapter, but made you use your brain, to solve a new
problem similar, but with a twist, so this put what you just learned to
practical use, I can't remember who wrote this original book, it was yellow,
but I would love the chance to thank him, and if anyone out there has this
book, I would love to get the copy from you, as my (insert bad name here)
ex-wife sold or gave away all my books, which were quite a few, well over a
hundred to charity, and to various used bookstores, she gave them away, the
only thing that makes me feel better is that maybe, just maybe, someone else
would have the spark and inspiration, and have a life changing experience
like I did.  Because at the time I had crons disease, it really did change
my life; it got my mind off my problems, and gave me a purpose.

Hope this helps, definitely look up this book, or the newer version, sorry
to ramble, but I like to help fledgling coders out, as I have this
philosophy, if none of us programmers shared our code, and our knowledge,
there is no way that the game industry, app industry for that matter would
have matured as much and as fast as we have.  So when another programmer
asks, hey how did you make it do this, or how would you make a guy walk
around the screen like in the videogames <- (7th Grade Apple Programming
Teacher Reference - Mr. Ream Your Awesome.) He answered me in theoretical
information, which I then put to use for my final project/program and had
that little guy walking all over the screen with the keyboard.

Ciao' 4 Now,

StOrM3

-----Original Message-----
From: gameprogrammer-bounce@xxxxxxxxxxxxx
[mailto:gameprogrammer-bounce@xxxxxxxxxxxxx] On Behalf Of Dominic McDonnell
Sent: Monday, September 25, 2006 9:44 PM
To: gameprogrammer@xxxxxxxxxxxxx
Subject: [gameprogrammer] Re: Simple C++ Program

The earlier input has left a carriage return in the input queue. Call 
getchar() or similar to get rid of it.
D McDonnell

Craig Chambers wrote:

>hi,
>this may be a little off topic, but i have a small
>problem. every time i write a small program (i'm just
>learning too) and i add a scanf() or cin line to the
>end of my program to make the program wait so i can
>see the results, it ignores the first one, so i have
>to put 2!!!!!!! is this wierd or am i doing somthing
>wrong?
>it only happens if earlier in the program i have asked
>for user input. I'm using bloodshed's devc++. am i
>doing something wrong with my user input earlier in
>the program?
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
>
>
>---------------------
>To unsubscribe go to http://gameprogrammer.com/mailinglist.html
>
>
>
>  
>


---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html



---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: