add pure virtual

add interfaces like classes
add template example
This commit is contained in:
2025-02-12 13:03:15 +01:00
parent 4c7ee6f3a6
commit dc3cfc8fa3
9 changed files with 104 additions and 4 deletions
+10
View File
@@ -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__