Results 1 to 2 of 2

Thread: Can't display a string

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

    Unhappy Can't display a string

    Hi everyone, I have a school assignment that is kicking my butt. I'm suppose to define a class called AccountList which is a container of pointer to objects of another class called Accounts. The class AccountList is derived from QList<Account*>. The class AccountList has not data member but only member functions void addAccount(Account* a); void displayList(); ... My problem here is that when I call the function displayList() from the main() using an object of AccountList, I get an error "void value not ignored as it ought to be". PLEASE ASSIST

  2. #2
    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: Can't display a string

    My problem here is that when I call the function displayList() from the main() using an object of AccountList, I get an error "void value not ignored as it ought to be". PLEASE ASSIST
    We cannot definitively diagnose this without seeing the actual code line that generates the error. Chances are it reads like:
    Qt Code:
    1. someVariable = someFunction(...);
    To copy to clipboard, switch view to plain text mode 
    where someFunction(..) returns void.

Similar Threads

  1. qDebug string display
    By zgulser in forum Newbie
    Replies: 9
    Last Post: 2nd July 2012, 13:59
  2. Replies: 0
    Last Post: 14th April 2010, 12:21
  3. display time as as string ?
    By Petr_Kropotkin in forum Newbie
    Replies: 26
    Last Post: 29th January 2010, 15:46
  4. How to display individual character of a string?
    By cooper in forum Qt Programming
    Replies: 2
    Last Post: 15th July 2009, 05:19
  5. QTableView does not display time string correctly
    By ad5xj in forum Qt Programming
    Replies: 1
    Last Post: 5th August 2007, 20:35

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.