Click here to Skip to main content
15,879,613 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:

void * ptr=0xFFFF0;

What I have tried:

it can be done in assembly language through far jump but how can it be done in c or c++.
pointer can access any address but can it be avoid to access to save a address
Updated 24-Mar-16 5:37am
Sergey Alexandrovich Kryukov 24-Mar-16 19:43pm    
In what OS, CPU?

1 solution

You could try VirtualProtectEx with the memory protection option: PAGE_NOACCESS?
Share this answer
Ravinder Singh 24-Mar-16 11:58am    
i want to code in pure c or c++ no mixing
Dave Kreskowiak 24-Mar-16 12:42pm    
There's no such thing in C/C++. This is functionality that would be exposed by the operating system (if available), not the by the C/C++ language.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900