TheQuest
11th October 2009, 19:43
I'm trying to learn how to program in C++ with Qt4.5. I am sure I am missing something but I cannot understand the following compiler message:
birthday.cpp: In member function ‘bool Birthday::append(const QString&, const QDate&)’:
birthday.cpp:22: error: invalid use of incomplete type ‘struct QPair<QString, QDate>’
The incriminated code is just this
bool Birthday::append( const QString& name, const QDate& date )
{
...
QPair<const QString&, const QDate&> data = qMakePair( name, date );
...
}
Thanks in advance to everyone who will reply.
fabio
birthday.cpp: In member function ‘bool Birthday::append(const QString&, const QDate&)’:
birthday.cpp:22: error: invalid use of incomplete type ‘struct QPair<QString, QDate>’
The incriminated code is just this
bool Birthday::append( const QString& name, const QDate& date )
{
...
QPair<const QString&, const QDate&> data = qMakePair( name, date );
...
}
Thanks in advance to everyone who will reply.
fabio