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

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

This note was uploaded on 02/26/2012 for the course MBA IT DOM1 taught by Professor Kviswanathan during the Spring '12 term at Indian Institute of Technology, Chennai.

Ask a homework question - tutors are online