#include <string>
#include <iostream.h>
template <class T>
class StringTest {
public:
virtual void runTest();
void testFunction();
};
template <class T>
void StringTest<T>:: runTest() {
testFunction ();
}
template <class T>
void StringTest <T>::testFunction() {
cout << "in StringTest" << endl;
string s("I am a shot string");
cout << s << endl;
s.insert(s.begin()+10,'r' );
cout << s << endl;
s += "and now a longer string";
cout << s << endl;
string::size_type spos = s.find("and");
s.insert(spos, " ");
cout << s << endl;
s.erase(spos);
cout << s << endl;
}
int main() {
StringTest<wchar_t> ts;
ts.runTest();
}