Thread: question about the loop in case conversion program

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,820
    [adding to hijack]
    Ya i was thinking the same thing!
    [/adding to hijack]
    Woop?

  2. #2
    Registered User Elhaz's Avatar
    Join Date
    Sep 2004
    Posts
    32
    Axon,

    Thanks for the code insert, it helped a lot in figuring out "how" it was happening. I noticed a similar thing when I was trying to get a new line between enter-key presses. I put a "\n" in the loop hoping to break up input and output lines but it inserted a new line between each character. Cool.

    And thanks for the welcome!


    Hunter2,

    Thanks for the explanation. Really helped a lot as to "why" it was happening. As for whitespace, I noticed that if I input a short sentence it outputs the whole converted sentence, minus the spaces. I guess the loop just keeps telling it to go back for more even after the white space.

    Thanks, too, for the memory tips. Glad to know it's not that easy to do serious damage.


    quzah,

    Can't say I know why Schildt's name would cause you to cringe. Is his stuff no good? But hey, it's a breath of fresh air compared to what I was working out of before. I fear to mention it because if Shildt makes you cringe then this'll probably make you faint dead away... Davis's "C++ for Dummies". Shock! Horror! Yes, THAT was a terrible book. Had to read each chapter three times just to make sense of it. Way too many holes. Had to grit my teeth through all the bad jokes too.

    Schildt's book give's good detail (so far) and has program assignments (something I really needed). That and no stupid jokes to grit my teeth through.


    PorkyChop,

    Thanks for the binary shift operator info. I will definitely look into it. I'm still a beginner but can already sorta see a difference between smooth and chunky code (at a beginner level). Elegant code is something I'll definitely strive for as I progress.


    quzah (again) and prog-bman,

    Hey, I don't mind you hijacking my thread. I'm just "da lil' fish in da big pond" and will take any chance to learn that I can get. Wanna fill me in on it a little more? What thread is this spawned from? I'll check it out.


    Thanks again to all for your input.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. get keyboard and mouse events
    By ratte in forum Linux Programming
    Replies: 10
    Last Post: 11-17-2007, 05:42 PM
  2. Intel syntax on MinGW ?
    By TmX in forum Tech Board
    Replies: 2
    Last Post: 01-06-2007, 09:44 AM
  3. ascii rpg help
    By aaron11193 in forum C Programming
    Replies: 18
    Last Post: 10-29-2006, 01:45 AM
  4. Replies: 27
    Last Post: 10-11-2006, 04:27 AM
  5. rand()
    By serious in forum C Programming
    Replies: 8
    Last Post: 02-15-2002, 02:07 AM