add intro
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user