#include "stdafx.h"
#include <iostream.h>
#include <stdio.h>
#include <string.h>
class inventory
{
private:
int prodID;
char prodDescription[20];
int qtyInStock;
public:
inventory()//default constructor
{
prodID=0;
strcpy(prodDescription,"-");
qtyInStock=0;
}
inventory(int a,char *b,int c) //constructor that initializes a new Inventoryobjects with the values passed as arguments
{
prodID=a;
strcpy(prodDescription,b);
qtyInStock=c;
}
};
int main(int argc, char* argv[])
{
inventory obj(1,"cotton tshirt",4);
return 0;
}
Please Im not trying to get my homewotk done, just to understand my errors.
It complies without problem. But doesn't run.
Thanks again