Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Using cin in the application output instead of using a terminal
Forum Updated to NodeBB v4.3 + New Features

Using cin in the application output instead of using a terminal

Scheduled Pinned Locked Moved Solved Installation and Deployment
3 Posts 2 Posters 530 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on 19 Feb 2022, 11:06 last edited by
    #1

    hello everyone, recently I came up with this problem, i have a program i C++ that in a certain moment wants the user to insert some data but when i ran the program and i saw the output on the application output it just "jump" the part where cin appears and the only way that i had to make that the program actually let me introduce some data was checking the run in terminal box, the question is, is there any way to make the program recognice cin in the application output? thanks in advance :)

    J 1 Reply Last reply 19 Feb 2022, 12:35
    0
    • ? A Former User
      19 Feb 2022, 11:06

      hello everyone, recently I came up with this problem, i have a program i C++ that in a certain moment wants the user to insert some data but when i ran the program and i saw the output on the application output it just "jump" the part where cin appears and the only way that i had to make that the program actually let me introduce some data was checking the run in terminal box, the question is, is there any way to make the program recognice cin in the application output? thanks in advance :)

      J Offline
      J Offline
      JonB
      wrote on 19 Feb 2022, 12:35 last edited by
      #2

      @luquemeister said in Using cin in the application output instead of using a terminal:

      recognice cin in the application output?

      That does not mean anything. From Qt Creator you need to enable the "run in terminal" so that it has somewhere to read from. From outside Cretaor you will need to run your application from a terminal (e.g. xterm) so that it has a standard input to read from.

      If you don't want to use any terminal you must get rid of cin (and cout) and do everything as a UI operation with suitable widgets for input/output.

      ? 1 Reply Last reply 19 Feb 2022, 12:46
      1
      • J JonB
        19 Feb 2022, 12:35

        @luquemeister said in Using cin in the application output instead of using a terminal:

        recognice cin in the application output?

        That does not mean anything. From Qt Creator you need to enable the "run in terminal" so that it has somewhere to read from. From outside Cretaor you will need to run your application from a terminal (e.g. xterm) so that it has a standard input to read from.

        If you don't want to use any terminal you must get rid of cin (and cout) and do everything as a UI operation with suitable widgets for input/output.

        ? Offline
        ? Offline
        A Former User
        wrote on 19 Feb 2022, 12:46 last edited by
        #3

        @JonB okay thank you very much :)

        1 Reply Last reply
        0

        1/3

        19 Feb 2022, 11:06

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved