I think this is an easy question but I don't know the answer to it. How does one link the value of an argument to a function and the functions parameters? For instance:
int a;
int b;
void fn(int &c, int &d)
{
c++;
d++;
}
int main()
{
fn(a,b);
cout << "A:" << a << " B:" << b << endl;
return 0;
}
Desired result : "A:1 B:1"
How do I link a with c and b with d (only when I make the function call)?
(Nevermind, problem resolved) How do I delete a post?