#include <iostream>
using namespace std;
template<class _prec=double>
class myclass {
public:
static const string mystuff[];
_prec avalue;
};
template<class _prec>
const string myclass<_prec>::mystuff[] = {"Athing", "Another","Things"};
int main() {
myclass<> m;
cout << m.mystuff[0] << endl;
}
Monday, March 31, 2008
Template static member brace-enclosed initializer
Or something...
Subscribe to:
Post Comments (Atom)
3 comments:
wtf does that end up printing.
Athing, for some reason I had trouble getting this working not sure why looking at it there's nothing weird but I wanted to log it somewhere...
This is ggreat
Post a Comment