wraptest.cc - Wrap<double>* w = new...

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

View Full Document Right Arrow Icon
#include <iostream> //#include "Wrap.h" #include "Wrap.cc" using namespace std; void testint() { Wrap<int>* w = new Wrap<int>(5); //cout << *w; w->display(cout); int v = w->get(); cout << v << endl; w->set(8); //cout << *w; w->display(cout); delete w; } void testdouble() {
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Wrap<double>* w = new Wrap<double>(5.5); //cout << *w; w->display(cout); double v = w->get(); cout << v << endl; w->set(8.8); //cout << *w; w->display(cout); delete w; } int main(int argc, char* argv) { testint(); testdouble(); }...
View Full Document

This note was uploaded on 04/19/2008 for the course CS 265 taught by Professor Daniele.stevenson during the Spring '08 term at Wisc Eau Claire.

Ask a homework question - tutors are online