6.096 Problem Set - MIT OpenCourseWare

To initialize an array of objects whose values are known at compile time, we can write Point parray[4] = {Point(0,1), Point(1,2), Point(3,5), Point(8,13)}; We can also allocate an array of objects dynamically using the new operator (this implicitly calls the default constructor of each new Point): Point* parray = new Point[4]; 1.2 Static ... ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download