Hello. I have a question about how to put string, double and intobject into a constructer in a class function by user-input. I amnow practicing pointer, array, and class and try to build a programup by my self. However, I am stacked.
my code is here :
#include
#include
using namespace std;
class InventoryItem {
private:
string description; // item description
double cost; // item cost
int units; // number of units on hand
int MAX_NUMBER = 10; // limit of times to ask
public :
// default constructor
InventoryItem() {
description = “”;
cost = 0.0;
units = 0;
}
string getDescription() {
return description;
}
double getCost()
{
return cost;
}
int getUnits() {
return units;
}
void setDescription(string d) {
description = d;
}
void setCost(double c)
{
cost =
PayPal Gateway not configured
PayPal Gateway not configured