add collections
add pointers
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#include "functions.h"
|
||||
|
||||
void changeInteger(int n)
|
||||
{
|
||||
n *= 2;
|
||||
}
|
||||
|
||||
int changeIntegerPerReturn(int n)
|
||||
{
|
||||
return n * 2;
|
||||
}
|
||||
|
||||
bool changeIntegerPerPointer(int* pN)
|
||||
{
|
||||
if (pN == nullptr) return false;
|
||||
|
||||
*pN *= 2;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool changeIntegerPerReference(int& n)
|
||||
{
|
||||
n *= 2;
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user