In the following program I'm getting the warning -> unused variable ‘fn’. I'm following along with a book so I don't know why it gave me that portion of code if it's unusable. Also, I don't understand this line at all.
-> void(*fn)(int& a, int* b) = add;
#include <iostream>
void add(int& a, int* b) { std::cout << "Total: " << (a + *b) << std::endl; };
int main()
{
int num = 100, sum = 500;
int& rNum = num;
int* ptr = #
void(*fn)(int& a, int* b) = add;
std::cout << "Reference: " << rNum << std::endl;
std::cout << "Pointer: " << *ptr << std::endl;
ptr = ∑
std::cout << "Pointer now: " << *ptr << std::endl;
add(rNum, ptr);
return 0;
}