Warning c++ class constructor

I am getting a warning and I would like to know what it is about so I can try to fix it within my class

header
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef ORDERS_H
#define ORDERS_H

#include<list>
#include<string>
#include "item.h"
using namespace 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]
 }
 ^
Last edited on
What constructor? The class is called Orders ... with an 's'.
thanks :v
Topic archived. No new replies allowed.