I'm trying to call a clear screen function in my program but I get this error: 'clrscr' : undeclared identifier. What am I doing wrong???
void clrsc(); //clear screen function
void clrsc()
{
clrscr();
}
then here's my complete code calling function clrsc():
Register reg1;
while(!fin)
{
//cout << "Clear the screen here ****";
clrsc();
menu2();
cin >> selec2;
if (selec2 == 1)
{
cout << "quantity: ";
cin >> quantity;
cout << "price: ";
cin >> price;
reg1.ring(quantity, price);
}
else if (selec2 == 2)
{
cout << "Your total is: " << reg1.findtotal() << "Please insert your tender: ";
cin >> tender;
cout << "your change is " << reg1.total(tender);
}
else if (selec2 == 3)
reg1.cancel();
else if (selec2 == 4)
{
cout << "How much we got?";
cin >> whatwegot;
cout << "The register is at "<< reg1.reconcile(whatwegot) << " for the day.";
}
else if (selec2 == 5)
fin = true;
else
cout << "Error.. try again.";
}
}