add virtual methods
add interface add pure virtual add casts add template example
This commit is contained in:
@@ -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__
|
||||
|
||||
Reference in New Issue
Block a user