My exe does not transfer anything to the logfile (jampded.exe) file

I want to create a simple handler for my game server. He will read the console directly and take whatever action I want. BUT! I can not transfer the output from the server to my exe or txt.

ping google.com > ping.log

It works fine, everything will be written to my log file. I also created an exe that can read the output like this:

ping google.com | my.exe

It also works great, my exe content is:

#include <iostream>
#include <windows.h>

using namespace std;

int main() {
    string input = "";
    while(cin) {
        getline(cin, input);
        cout << input << endl;
    };
    system("pause");
}

It displays all line by line.

Problem with jampded.exe. If I start with a batch file, it will be displayed in the console window, but I cannot transfer this for my log file or my.exe. I have no idea.

I am inserting cout-s into my code, so it shows that it is looping on the while loop. getline is waiting for cin, but nothing has passed. But why?

0
2

stderr .

jampded.exe | yourprogram.exe jampded.exe 2| yourprogram.exe

0

jampded, , , , / , . .

, jampded , . . ( "tail.exe -f" utnils gnuwin32.)

google , jamp.exe. .

0

All Articles