CSE 100 Lecture Notes - Lecture 1: Semicolon, In C, Valgrind
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; .