|
CD Chili Code plugin - C++ |
|
|
|
Demo for Core Design Chili Code plugin - C++.
/*
extracted from "Templates"
(http://www.cplusplus.com/doc/tutorial/templates.html)
*/
// sequence template
include
using namespace std;
template
class mysequence {
T memblock [N];
public:
void setmember (int x, T value);
T getmember (int x);
};
template
void mysequence::setmember (int x, T value) {
memblock[x]=value;
}
template
T mysequence::getmember (int x) {
return memblock[x];
}
int main () {
mysequence myints;
mysequence myfloats;
myints.setmember (0,100);
myfloats.setmember (3,3.1416);
cout
Article Supporters:
0 (total)
|