CMPSC 24 Lecture Notes - Lecture 2: Call Stack, Machine Code, Mutator Method

17 views2 pages
School
Course
Professor

Document Summary

Linker error: computer tries to link the missing code (declared functions but not implemented) and the function declaration but doesn"t find the code. Classes: default scope of all the member functions/variables are private if not declared (private to the class) Only the member functions can modify and access the member variables or other member functions. For structs, default is public (public and private cannot be used) Trying to access private variables/functions results in a compiler error. Check for syntax (convert to machine code) -> linking. Linker errors means that all syntax is correct. Pointer to the object that is being called. Use when the same name for private variable and function parameter. Scope operator: shows that a function definition belongs to a certain class. Have all function definitions in a header file; cpp file that contains all the definitions. Remains in the stack frame until the function execution ends.

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