ECE250 Lecture 2: 02 - C++

97 views3 pages

Document Summary

C++ if/loops/switch case statements and operators are all the same from ece 150. For loop counter variable must be declared outside the loop. Note that if you are looping through an array and you go outside the bounds of the array, you will access another memory element. Functions: similar, however they do not need to be part of a class. There will be a tester header file (single_list_tester. h) which will have the directive to your code (#include single_list. h ). There will then be a file (single_list_driver. cpp) which will include the tester file (#include single_list_tester. h ) which will run all of the code: this is not normal practice, as the header file usually only contains declarations. The definitions are stored in another file and then compiled altogether: to avoid having the same file included twice, there are guard statements. If the header has been declared, ignore it.

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
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents