{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Sol 1 - The keywords new and delete can be used to allocate...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream.h> struct vector { double x; double y; }; { o << "(" << a.x << ", " << a.y << ")"; return o; } void main () { vector a; a.x = 35; a.y = 23; cout << a << endl;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } The keywords new and delete can be used to allocate and deallocate memory. They are much more sweet than the functions malloc and free from standard C...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online