PDA

View Full Version : Can't display a string



ayanda83
16th August 2012, 00:45
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

ChrisW67
16th August 2012, 03:38
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:


someVariable = someFunction(...);

where someFunction(..) returns void.