ECE244H1 Final: ECE244 Final Exam Review

86 views8 pages

Document Summary

I/o functions (iostream) cin. fail() return true when fails to input cin. clear() clear the error state to further process input cin. ignore() ignore rest of the line after the first instance of error and skips to next line. Produces pointer that points to the variable. * (dereference operator): go to the address in. Produces the variable it"s pointing to (dereferencing) Automatically called when object of class pass out of scope. Meaning copy constructor initialized the new object with an already existing object. Assignment operator assigns the value of one object to another object both of which already in existence. When a new object is initialized with an existing one: 2. Object passed to a function as a non-reference parameter: 3. Target object and the initializing object shares different different memory location. Target object and initializing object shares same allocated memory. Delete dynamically-allocated array delete [] myarray; myarray = null; Delete dynamically-allocated data for(int i = 0; i < size; i++){

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Documents