hi all,

i m implementing a stack. the contents of which are class stack.
definition of class stack :
Qt Code:
  1. //stack.h
  2. class cellSpec
  3. {
  4. int row,col;
  5. public:
  6. cellSpec(int,int);
  7. void operator=(const cellSpec & temp);
  8. };
  9.  
  10. class stack
  11. {
  12. QString lastAction;
  13. QTableWidget *table;
  14. QStringList Contents;
  15. QList<cellSpec> cellAdd;
  16. public:
  17. stack(QStringList Contents,QTableWidget *table,QList<cellSpec> cellAdd,QString lastAction="none");
  18. // stack(const stack &);
  19. // stack operator=(stack &);
  20.  
  21. };
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. //stack.cpp
  2. #include "Stack.h"
  3.  
  4. cellSpec::cellSpec(int r,int c)
  5. {
  6. row = r;
  7. col = c;
  8. }
  9.  
  10. void cellSpec::operator=(const cellSpec & temp)
  11. {
  12. row = temp.row;
  13. col = temp.col;
  14.  
  15. }
  16.  
  17. stack::stack(QStringList Contents,QTableWidget *table,QList<cellSpec> cellAdd,QString lastAction)
  18. {
  19. lastAction = lastAction;
  20. table = table;
  21. Contents << Contents;
  22. cellAdd = cellAdd;
  23. }
  24. /*
  25. stack::stack(const stack &stack)
  26. {
  27. // return stack;
  28. }
  29. /*
  30. stack stack::operator=(stack &stack)
  31. {
  32. return stack;
  33. }
  34. */
To copy to clipboard, switch view to plain text mode 

i m receiving error :
Qt Code:
  1. C:/Qt/4.1.2/include\QtCore/../../src/corelib/tools/qvector.h(323) : error C2512: 'stack' : no appropriate default constructor available
  2. C:/Qt/4.1.2/include\QtCore/../../src/corelib/tools/qlist.h(179) : while compiling class-template member function 'void __thiscall QVector<class stack>::realloc(int,int)'
  3. C:/Qt/4.1.2/include\QtCore/../../src/corelib/tools/qvector.h(362) : error C2512: 'stack' : no appropriate default constructor available
  4. C:/Qt/4.1.2/include\QtCore/../../src/corelib/tools/qlist.h(179) : while compiling class-template member function 'void __thiscall QVector<class stack>::realloc(int,int)'
  5. Stack.cpp
To copy to clipboard, switch view to plain text mode 

main prg
Qt Code:
  1. void QGrid::pushUndo(QString lastAction,QTableWidget *table,QStringList Contents,int row,int col)
  2. {
  3. QStack<stack> undoStack;
  4. cellSpec cell(row,col);
  5. QList<cellSpec> cellList;
  6. cellList << cell;
  7. cellList.append(cell);
  8. stack row1(Contents,table,cellList,lastAction);
  9. undoStack.push(row1);
  10. }
To copy to clipboard, switch view to plain text mode 

What can be the problem