25.09.2017 Views

cpp_tutorial

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

C++<br />

int main(void)<br />

{<br />

Box Box1(3.3, 1.2, 1.5);<br />

Box Box2(8.5, 6.0, 2.0);<br />

Box *ptrBox;<br />

// Declare box1<br />

// Declare box2<br />

// Declare pointer to a class.<br />

// Save the address of first object<br />

ptrBox = &Box1;<br />

// Now try to access a member using member access operator<br />

cout

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!