This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: -use setw to set width of column cout<<set(8)<< "hello"; this will automatically right justify it Objects:- a class is a user determined data type- an object is a a member of a class int is a data type. int and doubles are 'primitive' data types and are not classes.-objects have data fields. object fields contain primitive or object data Example: Class employee-an employee object has two fields: a string (name) a double (salary) construction: Class_name obj_name= class_name (parameters); or class_name obj_name (parameters; member function call: obj_name.mem_func_name (parameter);...
View Full Document
This note was uploaded on 05/19/2008 for the course PIC 10A taught by Professor Wittman during the Spring '08 term at UCLA.
- Spring '08