Can write a simple program with function with pointers for me?

Hello
Am new to pointers
Can anyone write a simple program with a simple function with pointers??
any function
I need to see examples for this
OR: If you have websites covering this?
I DO NOT WANT A WEBSITE EXPLAIN POINTERS !!
i want codes having function with pointers
thanks in advanced..
Okay, I know you said specifically that you don't want a website, but honestly, there are so many ways to work with pointers that it's absolutely pointless for anyone to post sample code here. Trust me, you do need to read up on them first. If you have specific questions after that, feel free to post them.

So, despite your request for no websites, my best answer is to point you to the tutorial section:

http://cplusplus.com/doc/tutorial/pointers/
Here is a link to an online book:

http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html

If you've read that and still have questions, you may come back and ask.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

// Prototype 
void FuncX( int* );

main() {

    // Declare and initialize an int
    int A = 99;

    // Pass the address of A
    FuncX( &A );

   //See the results
   cout << A;

}

// FuncX receives the address of any int into a pointer to an int
void FuncX( int* pX ) {

   // Set what pX is pointing to to a new value
  *pX = 12345;

}

Thanks for all !!
sorry for the late reply
I got A- !! :$
Oh my god
I can not believe that I finished that horrible semester :S
thanks again
Goodbye C++ !!
Topic archived. No new replies allowed.