i don't know what a read access violation is?

i have done research on the internet. i can't find a straight answer. what is a
read access violation?
You gave the CPU an address to read, and you weren't allowed to read it.

So the OS just terminates the program as being faulty, and that's the error message you get.
in overly simple terms:
if you imagine that your computer's ram is one giant big free for all array...
your operating system puts blocks around sections of it, saying 'this block is for the OS, that block is for your web browser, this one is your video card driver program, that one is your mouse, ... and so on for every program running. Allowing one program to modify the memory of another can be fun (back in the day) but for various reasons (data security, virus defense, system crash defense, more) the OS does not allow a program to access the memory that is marked as owned by another program. If you do that, the OS will KILL your program with extreme prejudice -- and give you an access violation error message. So that is what it is: you are trying to do something to memory that does not belong to you.

to trigger this, a couple of lines of code that will blow up for you to play with:

int *x = null;
x++;
*x = 1234;
int y[10];
y[10000] = 1234;

very simple, program tried to read or write into memory which does not exist or does not belong to a process.

for example:

1
2
3
4
int* ptr;  // not pointing to valid memory

*ptr = 3; // write access vioalation
int b = *ptr; // read access violation 
Topic archived. No new replies allowed.