Results 1 to 3 of 3

Thread: cin or scanf or what?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    28
    Is there a way to input a int from a console application and make it where it doesn't create a newline after you press enter? so you can prinf more text on the same line you got the input from?

  2. #2
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    Code:
    cin >> YourVariable; //don't end the line with endl

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    28
    Just try it. I don't end it with endl, i just use
    cin >> variable;

    it automatically makes a newline when you press enter to input the data. there HAS to be a way to skip that part.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width