Results 1 to 3 of 3

Thread: In QT Creator iostream - no such file or directory

  1. #1
    Join Date
    Sep 2014
    Posts
    6
    Qt products
    Qt5
    Platforms
    MacOS X

    Default In QT Creator iostream - no such file or directory

    Hi,
    I have did a simple program in QT Creator3.4.2 (Macbook El Capitan).
    The line "#include <iostream>" was under lined and says no such file or directory...

    How to resolve this issue ?

    Regards
    Mac

  2. #2
    Join Date
    Nov 2015
    Posts
    128
    Thanks
    70
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: In QT Creator iostream - no such file or directory

    hi,
    You could use #include <QDebug> instead of #include <iostream>

    for example:
    int a = 4;
    qDebug() << a; //this does "cout" working

    then you can see result in the "Application Output" tab (below row in the qt creator)

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: In QT Creator iostream - no such file or directory

    The line "#include <iostream>" was under lined and says no such file or directory...
    Does it compile? If it compiles then this is likely just a syntax highlighting glitch that may be remedied by updating Qt Creator. If it does not compile then the issue is with the state of your C++ tool chain, e.g. the file does not actually exist for the syntax highlighter to read.

Similar Threads

  1. Setting remote working directory in Qt Creator 3.2.1
    By rbaleksandar in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 20th August 2015, 22:59
  2. Replies: 12
    Last Post: 19th August 2015, 18:50
  3. Replies: 2
    Last Post: 2nd March 2012, 07:07
  4. Replies: 1
    Last Post: 23rd May 2011, 04:53
  5. Replies: 4
    Last Post: 9th May 2010, 16:18

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.