I went back and read what you wrote in post #1.
Your problem is that you are confused by how a function is declared and then called.
You did not “copy” the function and move it to main.c.
What you did was you copied a line of text for the purpose of editing in a different place.
You need to go back and learn how to create and use functions by doing something simple.
You will see the name of the function in possibly two, three or more places.
1) the function definition
2) a function call
3) a function prototype
Go and read how to do these three things.
Your problem is that you are confused by how a function is declared and then called.
You did not “copy” the function and move it to main.c.
What you did was you copied a line of text for the purpose of editing in a different place.
You need to go back and learn how to create and use functions by doing something simple.
You will see the name of the function in possibly two, three or more places.
1) the function definition
2) a function call
3) a function prototype
Go and read how to do these three things.


