topical media & game development
professional-program-25-Template-TemplateTest.c
? /
professional-program-25-Template-TemplateTest.c
TemplateTest.cpp
include <iostream>
include <string>
include <SimpleTemplate.h>
using namespace std;
int main(int argc, char** argv)
{
// Try wrapping in integer
int i = 7;
SimpleTemplate<int> intWrapper(i);
i = 2;
cout << "wrapper value is " << intWrapper.get() << endl;
// Try wrapping a string
string str = "test";
SimpleTemplate<string> stringWrapper(str);
str += "!";
cout << "wrapper value is " << stringWrapper.get() << endl;
}
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.