// Memory Re-write program
#include <iostream>
using namespace std;
int main()
{
int initialAdress = 1;
int* pointer = &initialAdress;
while(true) // I have no intention of breaking this loop
{
pointer += 1;
*pointer = 1337;
}
return 0;
}
Basicly what this program does is increase the actual memory adress that the pointer is pointing at by 1. I'm assuming this would give it a random memory adress. From here I assign that memory adress to the value 1 ( correct me if im not stating this properly). This continues forever, well until the computer crashes due to overwriting an important adress in memory. Please do not think Im some sort of script kiddie looking to crash computers, I'm not I just want to understand the language and its strange capabilities better.


Sign In
Create Account


Back to top









