#ifndef ORDERS_H
#define ORDERS_H
#include<list>
#include<string>
#include "item.h"
usingnamespace std;
class Orders
{
public:
Order(list<Item*>*items);
bool processItems();
void updateOrders(list<Item*>*items);//stores the list in the pending for received database
private:
list<Item*> *ITEM_ORDERS;
/*MYSQL_DB *DATABASE;*/
};
#endif // ORDERS_H
cpp:
1 2 3 4 5 6 7 8
#include "orders.h"
Orders::Order(list<Item *>*items)
{
for(unsigned i = 0; i < items->size();i++)
ITEM_ORDERS->push_front(items->front());
}
warnings:
1 2 3 4 5 6
orders.cpp:-1: In member function 'int Orders::Order(std::__cxx11::list<Item*>*)':
orders.cpp:7: warning: no return statement in function returning non-void [-Wreturn-type]
}
^