INST 201 Lecture Notes - Lecture 5: Include Directive, C Mathematical Functions, Global Variable

43 views2 pages

Document Summary

Inst201 lecture 5: member class definitions: member function definitions-- classes usually contain functions, most of which will be defined outside of the actual class definition. You may also define them at this point, but most functions are simply declared; that is, without coding the body of the function. This is where it all starts: function definitions-- it is your choice whether or not to define your functions when you declare them. Usually, functions longer than 1 or 2 lines are defined below main() for easier readability. The #include statement tells the c++ preprocessor to insert the definitions of variables, classes, and functions into the current file. #include , for example, lets you use the cout and cin functions, and #include lets you use extra functions like the square root function sqrt(). To #include files that are not standard with c++ (files you define yourself, for instance) you use quotation marks instead of angle brackets.

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