![]() |
Data Abstraction and Problem Solving with C++Walls and Mirrorsby Frank M. Carrano |
![]() |
NewClass.cppGo to the documentation of this file.00001 00015 template <typename T> 00016 NewClass<T>::NewClass() 00017 { 00018 } // end default constructor 00019 00020 template <typename T> 00021 NewClass<T>::NewClass(T initialData) 00022 : theData(initialData) 00023 { 00024 } // end constructor 00025 00026 template <typename T> 00027 void NewClass<T>::setData(T newData) 00028 { 00029 theData = newData; 00030 } // end setData 00031 00032 template <typename T> 00033 T NewClass<T>::getData() 00034 { 00035 return theData; 00036 } // end getData |