CSE 100 Lecture Notes - Lecture 1: Semicolon, In C, Valgrind

46 views2 pages

Document Summary

Course objective: what should we take away from this course: the ability to choose the correct data structure to solve a problem. Introduction to key concepts in c+: priority, c++: getting correct programs to run as fast as it can; incorrect program are on their own, java: not allowing incorrect programs to run, pointers in c++ Example int a = 5; int *ptr = a: c++ class. // compiler error: invalid conversion from int" to int *". Example class myclass{ private: int a; public: // note: in c++, this is a pointer. void seta( int a ) { this->a = a; } int geta( ) { return a; } }; // note: in c++, class de nition ends with semicolon. Myclass c; // create object statically: declare a variable of type myclass and create an object of type myclass, the object is created on the stack, no need, and not allowed, to call delete c; .

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