I found a code like this on the internet and compared it to mine, saw he added & so I did too, but still not working, I tried his and his is working but mine not, help pls
#include "pch.h"
#include <iostream>
#include <string>
#include <cmath>
#include <ctime>
#include <cstdlib>
usingnamespace std;
void jeffko(int x); // Im testing the ability to change values through other functions
void makaroneko(int &x);
void bikko(int *x);// but int is incompatible with int *, I cannot figure out why, this aint it chief
int main()
{
int jeff = 10;
int bik = 12;
int makarone = 13;
jeffko(jeff);
makaroneko(makarone);
bikko(bik);
cout << makarone << endl;
}
void jeffko(int x) {
x = 500;
}
void makaroneko(int &x) {
x = 500;
}
void bikko(int *x) {
*x = 222;
}