43 lines
580 B
C++
43 lines
580 B
C++
//
|
|
// Created by David Hackbarth on 22.09.26.
|
|
//
|
|
#include "helpers.h"
|
|
|
|
void changeInteger(int value)
|
|
{
|
|
value *= 10;
|
|
}
|
|
|
|
int changeIntegerByReturn(int value)
|
|
{
|
|
return value * 10;
|
|
}
|
|
|
|
bool changeIntegerByPointer(int* pValue)
|
|
{
|
|
if (pValue == nullptr)
|
|
return false;
|
|
|
|
*pValue *= 10;
|
|
|
|
return true;
|
|
}
|
|
|
|
void changeIntegerByReference(int& value)
|
|
{
|
|
value *= 10;
|
|
}
|
|
|
|
void createInteger(int* pNumber)
|
|
{
|
|
pNumber = new int(0);
|
|
}
|
|
|
|
void createIntegerWithPointerPointer(int** ppNumber)
|
|
{
|
|
if (ppNumber == nullptr)
|
|
return;
|
|
|
|
*ppNumber = new int(0);
|
|
}
|