add virtual methods

add interface
add pure virtual
add casts
add template example
This commit is contained in:
2025-02-12 16:51:05 +01:00
parent a0b1dd4c08
commit 0e140ba81f
9 changed files with 97 additions and 3 deletions
+10
View File
@@ -10,4 +10,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__