You have some knowledge misconceptions here. Read through Lesson 6 Pointers and Lesson 4 Functions. After doing that you will be able to see what you are doing wrong.