add pure virtual
add interfaces like classes add template example
This commit is contained in:
@@ -9,4 +9,14 @@ void changeInt(int n);
|
||||
void changeIntPointer(int* pN);
|
||||
void changeIntReference(int& n);
|
||||
|
||||
template<class T>
|
||||
void safeDelete(T*& pObj)
|
||||
{
|
||||
if (pObj != nullptr)
|
||||
{
|
||||
delete pObj;
|
||||
pObj = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __FUNCTIONS_H__
|
||||
Reference in New Issue
Block a user