Thread: pointer specific

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jan 2012
    Posts
    12

    pointer specific [solved]

    how to wrap pointers?

    do i need to align pointer in memory (by padding or something)?

    i have array table of chars.
    example char array[65536).

    making:
    char *ptr = array;

    //in some loop (this dont work)
    *ptr += some_number;
    *ptr &= 0xffff; //modulu 65535+1

    //this work, but no pointer used
    value = array[index++ & 0xffff];

    ideas for pointer wrapping?
    Last edited by c coder; 06-11-2012 at 07:38 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. New to c++ some specific questions, gui, db, xml
    By bpr in forum C++ Programming
    Replies: 4
    Last Post: 01-12-2010, 12:48 PM
  2. Replies: 3
    Last Post: 10-30-2009, 04:41 PM
  3. Replies: 4
    Last Post: 08-27-2007, 11:51 PM
  4. Pointer to specific memory address
    By elnerdo in forum C++ Programming
    Replies: 10
    Last Post: 05-19-2006, 07:35 AM
  5. Platform Specific...
    By Cheeze-It in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 09-29-2002, 01:48 AM

Tags for this Thread