Results 1 to 4 of 4

Thread: Error printing a string

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2012
    Posts
    201
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    26
    Thanked 1 Time in 1 Post

    Smile Error printing a string

    Hi there, why does the following statement give an error in Qt?
    Qt Code:
    1. cout << r1.toString() <<endl;
    To copy to clipboard, switch view to plain text mode 
    I have a class named "R" and r1 is an object of class "R". toString() is a string returning member function of class "R". when I run my program I get the following error.
    errorImage.jpg
    I have to mention that the above does not give an error when run in pure C++. It's only when I run it in Qt that it gives an error.
    Last edited by ayanda83; 11th July 2012 at 09:21.

Similar Threads

  1. std string to QString error
    By Daxos in forum Qt Programming
    Replies: 2
    Last Post: 24th May 2010, 17:38
  2. std:string how to change into system:string?
    By yunpeng880 in forum Qt Programming
    Replies: 1
    Last Post: 14th April 2009, 09:51
  3. String operations, printing to stdout
    By Cruz in forum Newbie
    Replies: 3
    Last Post: 20th January 2009, 16:30
  4. Int to String - manipulating string
    By mickey in forum General Programming
    Replies: 6
    Last Post: 5th November 2007, 21: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.