39 lines
531 B
C++
39 lines
531 B
C++
#include "functions.h"
|
|
#include <iostream>
|
|
|
|
using namespace std;
|
|
|
|
void functionF()
|
|
{
|
|
}
|
|
|
|
void printArray(int numbers[], size_t count)
|
|
{
|
|
for (size_t i = 0; i < count; i++)
|
|
{
|
|
cout << numbers[i] << " ";
|
|
}
|
|
cout << endl;
|
|
}
|
|
|
|
void changeInt(int n)
|
|
{
|
|
cout << "addr of n: " << &n << endl;
|
|
n *= 10;
|
|
}
|
|
|
|
void changeIntPointer(int* pN)
|
|
{
|
|
if (pN == nullptr) return;
|
|
|
|
cout << "addr of pN: " << &pN << endl;
|
|
cout << "pN: " << pN << endl;
|
|
*pN *= 10;
|
|
}
|
|
|
|
void changeIntReference(int& n)
|
|
{
|
|
cout << "addr of n: " << &n << endl;
|
|
n *= 10;
|
|
}
|