/* * main.cpp * * Created on: Feb 25, 2016 * Author: mike */ #include #include "SPtr.hpp" //------------------------------------------------------- int main() { SPtr sp; // create a smart pointer to a T cout << "Smart pointer created" << endl; *sp = 12.345; cout << "sp = " << *sp << endl; SPtr sp2(sp); // make a copy cout << "made copy sp2 from sp" << endl; *sp2 = 67.890; cout << "sp = " << *sp << endl; cout << "sp2 = " << *sp2 << endl; }