cannot call member function 'void Additem::FunctAddToDb()' without object
Solved
General and Desktop
-
Hi,
I'm trying to call a function Additem::FunctAddToDb () from review.cpp.
The code:
Additem.h
namespace Ui { class Additem; } class Additem : public QDialog { Q_OBJECT public: //db QSqlDatabase db; explicit Additem(QWidget *parent = 0); ~Additem(); //Functions void FunctAddToDb();
review.cpp
Additem::FunctAddToDb ();
When I run it, I get the following error message:
C:\Programming\Projects\Folkfriends\review.cpp:58: error: cannot call member function 'void Additem::FunctAddToDb()' without object
Additem::FunctAddToDb ();What am I missing here? Thank you.