Thread: REAL keyboard input used in A "FUNCTION." ?

  1. #1
    Registered User
    Join Date
    Sep 2010
    Posts
    90

    REAL keyboard input used in A "FUNCTION." ?

    How to replace this with REAL keyboard input ..... account1.debit( 25 ); ?

    Lets say your present balance is $50.00

    account1.debit( 25. );

    I hope some of you have a clue of what this code does. If not, account1 calls the debit function of the program and pass this embedded value of 25.00 to be subtracted from the balance and display the results. No need to provide the whole source code, you might get more confuse.

    Using enbeded values in the source code ... being taught this way is ass-backward. How about you type in 25 or any other number and HIT-ENTER and the function do the same thing. Is that too hard to understand in words, Well let me show and tell you ...

    It must be rocket science for C++ because the subject is way up in chapter-15 of Deitel C++ and we on chapter-13. No wonder I never figure out how to do it and no one here had a clue of what I was talking about... or they pretended very well.

    Anyway, Deitel got nineteen examples for stream_manipulator using getline(cin, yourVar) and there is "NOT A SINGLE EXAMPLES" that will do what I just detailed twice here. It would be the first question a 6-grader would ask... That's great but can I type it in????

    Now I see whay my questions are too advance, even Deitel never taught no body how-to.

    Where do I have to go to obtan this kind of information using real C++ code? I found NOTHING here that can do this SHOULD BE simple thing.

    Thank you

    Previous reply on other thread did not work. Maybe the qestion is made more clear for all to understand. I can upload all 19 Deitel examples but it will make you feel so ashame that this simple 3rd grade requiest is not in the package.
    Last edited by sharris; 01-24-2011 at 09:01 AM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. About aes
    By gumit in forum C Programming
    Replies: 13
    Last Post: 10-24-2006, 03:42 PM
  2. Trouble with a lab
    By michael- in forum C Programming
    Replies: 18
    Last Post: 12-06-2005, 11:28 PM
  3. Keyboard input without waiting (Borland C++)
    By adamdalziel in forum Game Programming
    Replies: 6
    Last Post: 09-24-2001, 04:20 PM
  4. Replies: 3
    Last Post: 09-12-2001, 10:45 AM