Results 1 to 2 of 2

Thread: How to get a string on console applications?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2012
    Location
    Iran , Tehran
    Posts
    93
    Thanks
    5
    Platforms
    Unix/X11 Windows Android

    Question How to get a string on console applications?

    Hi guys!
    How to get a string on console applications?

  2. #2
    Join Date
    Oct 2009
    Posts
    483
    Thanked 97 Times in 94 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to get a string on console applications?

    If by "get a string" you mean read a string from the standard input, then use std::cin. Keep in mind that the call will block until the input is entered. If you need to keep an event loop running while waiting for the input, you will need another approach, like using the ncurses library or monitoring stdin with QSocketNotifier.

Similar Threads

  1. Replies: 7
    Last Post: 10th September 2011, 08:03
  2. Replies: 3
    Last Post: 8th June 2011, 06:36
  3. Replies: 2
    Last Post: 18th April 2011, 08:36
  4. std:string how to change into system:string?
    By yunpeng880 in forum Qt Programming
    Replies: 1
    Last Post: 14th April 2009, 08:51
  5. Int to String - manipulating string
    By mickey in forum General Programming
    Replies: 6
    Last Post: 5th November 2007, 20:11

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.