diff --git a/src/02_CPP06.cpp b/src/02_CPP06.cpp new file mode 100644 index 0000000..1fb7eb2 --- /dev/null +++ b/src/02_CPP06.cpp @@ -0,0 +1,37 @@ +/* + * 02_CPP06.cpp + * + * Created on: 21.06.2018 + * Author: hendrik + */ + +#include +using namespace std; + +template class myarray { +private: + T* aptr; + unsigned int uisize; +public: + myarray(unsigned int pUisize) { + aptr = new T[uisize = s]; + } + + myarray() { + aptr = new T[uisize = s]; + } + + ~myarray() { + delete[] aptr; + } + T& operator[ ](int iindex) { + return (aptr[iindex]); + } +}; + +int main() { + + myarray intarray; + + cout << "End"; +}