BABAR C++ Course Running the Examples - HEPHY
BABAR C++ Course Running the Examples - HEPHY
BABAR C++ Course Running the Examples - HEPHY
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Plan of <strong>the</strong> daySimpleFloatArray ClassWhere are we at?• session 1: basic language constructs• session 2: pointers and functions• session 3: basic class and operator overloadingToday• design of two types of container classes• templates• friend• nested classesDesign and implement an array class with• run time sizing• access to element with x[i]• automatic memory management• automatic copy of array elements• automatic copy upon assignment• set all elements of array to a value• find <strong>the</strong> current size• dynamic resizingEach requirement leads to a member functionThere will be some technical issues to learn<strong>BABAR</strong> <strong>C++</strong> <strong>Course</strong> 99 Paul F. Kunz<strong>BABAR</strong> <strong>C++</strong> <strong>Course</strong> 100 Paul F. Kunz