Name: Anonymous 2008-08-07 16:56
I want to program for plan9, which language would suit me best?
take 6 (cycle "Ha") ++ "ruhi"
cycle "Ha" ++ "ruhi"
wxString GetTrannyName() {
wxString str;
for( int i = 0; i < 3; i++ ) {
str << "Ha";
}
str << "ruhi";
return str;
}#include <string>
#include <iostream>
using namespace std;
template <int i>
struct TrannyName
{
static const string str;
};
template <int i>
const string TrannyName<i>::str = string("Ha") + TrannyName<i - 1>::str;
template <>
const string TrannyName<0>::str = "ruhi";
int
main(void)
{
cout << TrannyName<3>::str << endl;
return 0;
}