COSC 1320 Lecture Notes - Lecture 25: Exception Handling

15 views3 pages
void table::input()
{
cin>>width;
cin>>length;
}
void table::input(int a, int b)
{
if a<0;
width = 1;
else
width = a;
}
int table::getw()
{return width
}
++++++++++++++>in main
{int newwid=t1.getw()
}
void table::getw(int &newwid)
{newwid=width;
}++++++++> in main;
T1.getw(newwid)
///write a class table with width and length
//set with testing by passing arguments
//get as void get(int &)
//In main call ome function
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows page 1 of the document.
Unlock all 3 pages and 3 million more documents.

Already have an account? Log in

Get OneClass Notes+

Unlimited access to class notes and textbook notes.

YearlyBest Value
75% OFF
$8 USD/m
Monthly
$30 USD/m
You will be charged $96 USD upfront and auto renewed at the end of each cycle. You may cancel anytime under Payment Settings. For more information, see our Terms and Privacy.
Payments are encrypted using 256-bit SSL. Powered by Stripe.