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;


closed as off-topic by josh poley, Vitaly Osipov, Megabeets, perror, 0xec Aug 12 '17 at 17:51

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on software development are off-topic here, but can be asked on Stack Overflow." – josh poley, Vitaly Osipov, Megabeets, perror, 0xec
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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.