Results 1 to 2 of 2

Thread: Console Not Working

  1. #1
    Join Date
    Jun 2011
    Posts
    203
    Thanks
    7
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Console Not Working

    Hello, I'm trying to figure out how to get outputs to show within my console app:

    Qt Code:
    1. #include <QtCore/QCoreApplication>
    2. #include <QDebug>
    3.  
    4. char ConvertIntToChar(int iIntToConvert);
    5.  
    6. int main(int argc, char *argv[])
    7. {
    8. QCoreApplication a(argc, argv);
    9.  
    10. return a.exec();
    11.  
    12. int nTimer = 123;
    13. qDebug() << nTimer;
    14. char cText = ConvertIntToChar(nTimer);
    15. qDebug() << cText;
    16. char *pcText = &cText;
    17. qDebug() << *pcText;
    18. }
    19.  
    20. char ConvertIntToChar(int iIntToConvert)
    21. {
    22. char cText[20];
    23. sprintf("%d", cText);
    24. return(*cText);
    25. }
    To copy to clipboard, switch view to plain text mode 

    My compile output suggests that the program enters my build-desktop folder and then says:

    mingw32-make[1]: Nothing to be done for `first'.
    Not sure what that means but I'm certainly not getting anything showing in my console!

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Console Not Working

    Think, if the line 10 ends whenever their action ?

Similar Threads

  1. Replies: 7
    Last Post: 24th September 2012, 07:17
  2. Replies: 0
    Last Post: 3rd May 2012, 22:38
  3. Terminating a console app
    By cejohnsonsr in forum Newbie
    Replies: 3
    Last Post: 30th August 2010, 21:21
  4. QT Console app
    By yorkshireflatcap in forum Newbie
    Replies: 14
    Last Post: 22nd June 2010, 20:57
  5. Replies: 4
    Last Post: 27th March 2008, 09:21

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.