Thread: reset memory pointer

  1. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    13

    reset memory pointer

    hi:

    how do i reset the a pointer back to the first element after I do increment in a pointer like:
    *p++;

    please help!

    thanks in advance!

  2. #2
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    by storing the "root" pointer elsewhere.

    p = root;
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826

    Re: reset memory pointer

    Originally posted by muk_luk
    hi:

    how do i reset the a pointer back to the first element after I do increment in a pointer like:
    *p++;

    please help!

    thanks in advance!
    Here's a novel idea!

    *p--;

    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Mutex and Shared Memory Segment Questions.
    By MadDog in forum Linux Programming
    Replies: 14
    Last Post: 06-20-2010, 04:04 AM
  2. Assignment Operator, Memory and Scope
    By SevenThunders in forum C++ Programming
    Replies: 47
    Last Post: 03-31-2008, 06:22 AM
  3. Ban pointers or references on classes?
    By Elysia in forum C++ Programming
    Replies: 89
    Last Post: 10-30-2007, 03:20 AM
  4. Deallocate Memory and reuse pointer
    By appleGuy in forum C++ Programming
    Replies: 9
    Last Post: 06-20-2007, 11:07 AM
  5. Replies: 8
    Last Post: 01-04-2006, 07:42 PM