ECS 36B Lecture 12: Containers

42 views3 pages
Verified Note

Document Summary

Refer to tic-tac-toe program to help with the midterm. To debug, run debug attach to program. Add commands asking for input someplace before the code you want to debug because the compiler runs and then debugs -- want to give it time to attach. Prevents name collisions with functions in libraries that have the same name. When you need to modify something in a function. If we need to check for nullability , use a pointer. If we just need to modify values and something will be there, use references. Discouraged to use this because it increases odds of name collisions happening. Scope of nameplace lasts for the block (anything in curly brackets) Using namespace2; //leave this namespace when this scope ends. Using can be used for type definitions as well. C++ strings are more advanced than how strings were used in c. #include to access it in a program.

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