Added: C++ projects
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// Created by David Hackbarth on 22.09.26.
|
||||
//
|
||||
|
||||
#ifndef POINTERS_HELPERS_H
|
||||
#define POINTERS_HELPERS_H
|
||||
|
||||
void changeInteger(int value);
|
||||
int changeIntegerByReturn(int value);
|
||||
bool changeIntegerByPointer(int* pValue);
|
||||
void changeIntegerByReference(int& value);
|
||||
|
||||
void createInteger(int* pNumber);
|
||||
void createIntegerWithPointerPointer(int** ppNumber);
|
||||
|
||||
template<typename T>
|
||||
void safeDelete(T*& ptr)
|
||||
{
|
||||
if (ptr != nullptr)
|
||||
{
|
||||
delete ptr;
|
||||
ptr = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
#endif //POINTERS_HELPERS_H
|
||||
Reference in New Issue
Block a user