hello

I'm facing a problem with my C++ program as it constantly returns the error

undefined reference to function

I saw that the function takes an argument const int
I was sending just int,so I thought that was the problem.
So I did the following but it still returns the same error.

Code:
int b;
const int a = b;
function(a);
How can I convert b to const int in order to send it as an argument to the function?