reference in function
Hello, I have:
1 2 3 4
|
...
int a=rand();
int b=rand();
int& c=a*b;
|
and here are problems with declaration (because of the reference)
I tried:
1 2 3 4
|
int a=rand();
int b=rand();
int c=a*b;
int &x=c;
|
And there was error wrong int* to int
Please , how to solve this?
Topic archived. No new replies allowed.