Let's Make Things Better

C++ Read From Memory

#include 
void ptr(int* ptr )
{
    int* p = ptr;
    std::cout <<  "Address:"   << p   << std::endl;
    std::cout <<  "Value  :"   << *p  << std::endl;
}
int main(int argc, const char * argv[])
{
    //0x7ffeefbff55c;
    for(int i=0;i<15;i++)
    {
        int* p = (int*) 0x7ffeefbff551+i;
        ptr(p);
    }
    return 0;
}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.