EECS 183 Lecture Notes - Lecture 4: Return Type, Duplicate Code, Semicolon

108 views7 pages
EECS 183 Full Course Notes
1
EECS 183 Full Course Notes
Verified Note
1 document

Document Summary

When datatype of value read doesn"t match datatype of variable. No reading takes place again until cleared the state. #include using namespace std; int main () string message; cin >> message; cout << message; return 0; We need to include the string library. Stops at the first trailing whitespace, which is not consumed, but remains waiting in the input stream. To read a strings that includes white space (eg: hello world ) Then read pointer proceeds to after is not put into the string. Cin >> combined with getline ( ) Skips (reads and discards) char"s in the input stream. A function is a list of statements that can be executed by referring to the. An input value to the function appears between ( ) The function executes and returns a new value. A section of a program that can act on data, and returns a value. Every function you would ever want doesn"t already exist.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents