I'm using winpmem to create a memory image. I would like to create an interface that would allow a user to search for various patterns in the image. I'm using C++ to open and read the file but I am not able to dump the contents to standard output. I have tried to use various data types for the variable declaration that is streamed to standard output but I haven't been able to dump a text representation to the screen. Here is my code:

include "stdafx.h"

include "iostream"

include "iomanip"

include "fstream"

using namespace std;

int _tmain(int argc, _TCHAR* argv[])


double x;

int i = 0;

ifstream test;


if (!test){

cerr << "Unable to open file datafile.txt";

exit(1);   // call system to stop


while (test >> x) {

cout << i;

cout << ":";

cout << x;

cout << ",";




return 0;


  • seems to be about programming, not RE. – Igor Skochinsky Aug 12 '17 at 7:55
  • and the code appears to have lots of errors like declaring an uninitialised double which may contain garbage and prone to rounding errors not using is_open but comparing ifstream object. then cimparing the object to a doubke etc – blabb Aug 12 '17 at 8:02
  • double was just the last type that i used in my attempt to find the correct type. – stzy Aug 12 '17 at 12:08

Browse other questions tagged or ask your own question.