trega's New Writeupshttp://everything2.com/?node=New%20Writeups%20Atom%20Feed&foruser=trega2002-07-28T02:39:31ZPatience is a virtue (idea)http://everything2.com/user/trega/writeups/Patience+is+a+virtuetregahttp://everything2.com/user/trega2002-07-28T02:39:31Z2002-07-28T02:39:31Z"...I've been waiting a long time<br>
<p align="center">to fall down</p>
<p align="right"><a href="/title/black+and+blue">on my knees</a>..."</p>
<br>
...In my own <a href="/title/time">time</a>, my own <a href="/title/space">space</a> and on my own <a href="/title/terms">terms</a>. I feel <a href="/title/so+selfish">so selfish</a> for <a href="/title/wanting">wanting</a> it, <a href="/title/needing">needing</a> it, but soon it will have to be <a href="/title/reality">reality</a>, lest I lose my essence <a href="/title/amidst+the+confusion">amidst the confusion</a> and the upkeep. I don't really mind
the helping. It satisifies me to know that I can and am making lives a little easier.
<br>
<br>
<br>
"...I'm here all alone with my <a href="/title/waiting+for+life+to+begin">feet on the ground</a>
<br>
<p align="center">and my face in the air,</p>
<p align="right">waiting for life to begin..."</p>
<br>
...<a href="/title/Waiting">Waiting</a>, <a href="/title/waiting">waiting</a>, <a href="/title/waiting">waiting</a>. The word is beginning to grate on my nerves. I hear it constantly, everywhere I turn. I wish i could strike it from the <a href="/title/English">English language</a>. The only thing worse than hearing it, of course, is living in its shadow. It sits on my chest, heavy, pushing the air from my body and the optimism from…cin.getline in a loop error (thing)http://everything2.com/user/trega/writeups/cin.getline+in+a+loop+errortregahttp://everything2.com/user/trega2001-02-16T06:14:19Z2001-02-16T06:14:19ZFirst of all, for you <a href="/title/c%252B%252B">c++</a> <a href="/title/guru">guru</a>'s stop laughing and move on. This is for us new guys. :)
<br><br>
So you make your loop and figure you'll take input using a good old getline:
<br><br>
<a href="/title/cin">cin</a>.getline(var,30);
<br><br>
You run your code and sit there dumb founded as it flys by you on the screen. After several minutes of <a href="/title/tinkering">tinkering</a> you finally <a href="/title/give+up">give up</a> and use another method of getting the input such as <a href="/title/gets">gets</a>.
<br><br>
The problem is <a href="/title/obvious">obvious</a> and the solution quite <a href="/title/simple">simple</a>, after someone tells you. :) <br>Clear the buffer....
<br><br>
Yep, that's right just clear the buffer:
<br><br>
<pre>
<a href="/title/char">char</a> ch; //declare empty char variable
<br>
cin.get(ch); //clear buffer
</pre>
This problem usually only manifests itself in loops but sometimes it sneaks into other areas. The strange part is that it doesn't need to be cleared after each .getline, just once at the <a href="/title/beginning">beginning</a> of the <a href="/title/loop">loop</a>. Apparently the buffer gets the '<a href="/title/%255Cn">\n</a>' escape character stuck in it and that causes the…uncertain, confused (idea)http://everything2.com/user/trega/writeups/uncertain%252C+confusedtregahttp://everything2.com/user/trega2001-02-16T05:34:58Z2001-02-16T05:34:58ZLately i've been <a href="/title/feeling+strange">feeling strange</a>. I'm not <a href="/title/depressed">depressed</a> and i'm not sad. I just feel <a href="/title/cold">cold</a>. I'll have a <a href="/title/dream">dream</a> or an interesting thought and i'll look around, nobody there, at least nobody who understands, who cares. I'll save it in <a href="/title/anticipation">anticipation</a> of meeting someone who will. But in time I <a href="/title/forget">forget</a>, lose the <a href="/title/desire">desire</a> to remember.... lose the <a href="/title/feeling">feeling</a>.
<br><br>
<strong><a href="/title/cold">cold</a></strong>
<br><br>
When I can't share them,
<br>
the <a href="/title/precious">precious</a>, <a href="/title/curious">curious</a> thoughts,
<br>
and I have to <a href="/title/let+them+go">let them go</a>,
<br>
<a href="/title/a+piece+of+me">a piece of me</a> goes with them.
<br><br>
Now here I sit, <a href="/title/riddled">riddled</a> with <a href="/title/holes">holes</a>,
<br>
the <a href="/title/cold+wind">cold wind</a> of self realization blows through,
<br>
<a href="/title/chilling">chilling</a> me to the bone,
<br>
heavy is my <a href="/title/heart">heart</a>, my <a href="/title/mind">mind</a>.some thoughts on existence (idea)http://everything2.com/user/trega/writeups/some+thoughts+on+existencetregahttp://everything2.com/user/trega2001-02-06T02:33:59Z2001-02-06T02:33:59ZThe <a href="/title/world">world</a>'s not going to stop <a href="/title/spinning">spinning</a>, the <a href="/title/planets">planets</a> aren't going to fall out of <a href="/title/orbit">orbit</a> and <a href="/title/crash">crash</a> into <a href="/title/the+sun">the sun</a>, well at least not until the <a href="/title/andromeda+galaxy">andromeda galaxy</a> collides with our <a href="/title/milky+way">milky way</a>.
<br><br>
Until then you can rest assured that no matter how bad things get, they can always get worse, but they could get better and the world probably won't end. <a href="/title/You+may+die">You may die</a>, <a href="/title/others+may+die">others may die</a>. The world will keep on spinning, moving through time until it dies, <a href="/title/stumbling+into+oblivion">stumbling into oblivion</a>. It will be reborn over <a href="/title/millions">millions</a>, <a href="/title/billions">billions</a> maybe <a href="/title/trillions">trillions</a> of years or maybe not at all.
<br><br>
You may not make a difference this <a href="/title/lifetime">lifetime</a>, you may be <a href="/title/reborn">reborn</a>, <a href="/title/a+different+place+a+different+time">a different place a different time</a>, your <a href="/title/stardust">stardust</a> arranged in a different structure. Perhaps then you will do something, unravel the mystery that is the <a href="/title/existance">existance</a>.
<br><br>
Maybe <a href="/title/human">human</a> or <a href="/title/animal">animal</a>, <a href="/title/mineral">mineral</a>, <a href="/title/element">element</a> any form of matter. Will you ever know life again or travel throughout the rest of time existing as an inanimate nothingness.
…February 5, 2001 (idea)http://everything2.com/user/trega/writeups/February+5%252C+2001tregahttp://everything2.com/user/trega2001-02-05T05:30:00Z2001-02-05T05:30:00Z<a href="/title/Nothing">Nothing</a> seems right lately. I stumble through the days, barely doing anything of <a href="/title/signifigance">signifigance</a>. I tinkered with my <a href="/title/visual+basic">visual basic</a> assignment most of saturday, it's done, but its of such poor quality I don't even want to look at it again. The sad part is there is no doubt in my mind that it will get me <a href="/title/100%2525">100%</a>.
<br><br>
More work, never a break. <a href="/title/Constant+stress">Constant stress</a>, but it's for the best. Even now as I take the couple of minutes to write this node I am thinking too much. Of all the things that went wrong and I <a href="/title/contemplate">contemplate</a> what could be. Stress blocks all that crap out. There are the breaks, the talks to the people back home but sometimes even those are stressfull.
<br><br>
I remebered thinking to myself on many occasions, that guy does what he wants, doesn't care what other people think and what's up with the fargo thing. There aren't enough people like that around, <a href="/title/the+world+couldn%2527t+afford+to+lose+him">the world couldn't afford to lose him</a>. I didn't really know him but it still hit me hard.
<br><br>
I can't help but wonder…January 20, 2001 (idea)http://everything2.com/user/trega/writeups/January+20%252C+2001tregahttp://everything2.com/user/trega2001-01-20T03:18:43Z2001-01-20T03:18:43ZIt's been awhile since i've taken the time to <a href="/title/reflect">reflect</a> on my thoughts. I float just outside of my brain directing my body with <a href="/title/impartial">impartial</a> commands. I've come close to noding, i've had many reasons to. Yet I could not, the words had <a href="/title/no+meaning">no meaning</a>.
<br><br>
Life seems to be a task which must be completed. Emotions appear, <a href="/title/confusion">confusion</a>, <a href="/title/loneliness">loneliness</a>. These do not linger long in my concious mind. Everything is moving progressing towards the end. I've had to let go of it.
<br><br>
Emotional pain has become a constant <a href="/title/companion">companion</a>. I do not have enough energy to fight it anymore. My life seems to be progressing, yet i've not shed many of the <a href="/title/fears">fears</a> that hold me back. Without the pain to drive me and with no like minded <a href="/title/souls">souls</a> to join me on <a href="/title/my+journey">my journey</a> I back away, away from the crowd away from life.
<br><br>
<a href="/title/If">If</a>... no, never if. I must find a friendly soul, <a href="/title/uncorrupted">uncorrupted</a>, <a href="/title/caring">caring</a> and <a href="/title/infinitely+unique">infinitely unique</a>. Will I find you? Will you accept me, am I <a href="/title/worth">worth</a>y? A million questions, a <a href="/title/million">million</a> more <a href="/title/answers">answers</a>…