I am trying to dump the memory of my c++ app.
#include <iostream>
#include <fstream>
using namespace std;
int main () {
ofstream myfile;
myfile.open ("example.txt");
myfile << "Writing this to a file.\r\n";
myfile.close();
int *p;
*p = 25;
char b[] = "hello";
int a;
for (a=0; a==-1; *(p++)){
myfile.open ("example.txt");
myfile << p <<" "<< *p <<"\r\n";
myfile.close();
}
myfile.close();
return 0;
}
I get
Example.txt
Writing this to a file.
how to find a size of pointer/array? :D