1.
Code:
void func()
{
int x = 1
int& y = x; // int* y = &x;
return x + y; // return x + *y;
};
void func()
{
int x = 1
int& y = x; // int* y = &x;
return x + y; // return x + *y;
};
U ovo...
Code:
void func()
{
int x = 1
return x + x;
};
void func()
{
int x = 1
return x + x;
};
Ako bolje pogledamo &y (*y) stvarno nije potreban.
2.
Code:
int x = 3 + 4*7 + y + 2*y;
int x = 3 + 4*7 + y + 2*y;
U ovo...
Code:
int x = 31 + 3*y;
int x = 31 + 3*y;
Ovo je nesto kao matematicki pretprocesor.
Hvala na bilo kakvoj informaciji.