1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
void add (HANDLE hdl, struct carStock cars[ ], int & size)//add carStock details
{
int no;
char filename[]="Carinputscreen.txt";
getscreen(hdl,filename );
cars[size].carStockNo=cars[size-1].carStockNo+1;
gotoXY(hdl,32,7); cout<<cars[size].carStockNo;
validateString(hdl, 32,9,2,25,cars[size].model,"description must be between 2 and 25 characters");
cars[size].make=validateChar(hdl, 32,11,"Please enter either A,F,M,V for the make");
cars[size].costPrice=validateDouble(hdl,32,19,250,20000,"Please enter between 250 and 20000");
cars[size].sellingPrice=validateDouble(hdl,32,21,450,27000,"Please enter between 450 and 27000");
size++;
_getche();
}
|