EDIT :- I tried moving the function from the 2nd cpp to the main.cpp and it worked.
I\'m making a prime generator with 3 file (two of them are .cpp and one is .h)