How to access a dynamic array inside a std::set ?
hi once again!
it seems like this week i'm going to beak the record of the "biggest number of threads created by a single user" :)
i've created a class grocery and class for the data of the products ordered:
Code:
class grocery
{
dataProdOrder *prod;
unsigned int num;//num of elements in array
string idOrder;
string nameClient;
unsigned int totalPrice;
public:
...
}
class dataProdOrder
{
string idP; //id of the product to order
unsigned int quant; //quantity of each product to order
public:
...
};
I think i managed to save everything correctly inside a std::set, but now i need to see the product orders.
How can i do the following from the orders std::set?
Quote:
Cliente Name: Ricky
Order ID: 123R
Products Ordered: //from the dataProdOrder *prod;
- 123BRD QT:2 //from the dataProdOrder *prod;
- 546DRA QT:1 //from the dataProdOrder *prod;
...
Total Price: 20€