write to a pipe and so on
I want to rewrite a code to windows
In Unix setting, I use a FILE pointer and open the pipe to run the forced command. It is like the following:
I think it is a bit hard in Windows because the path is extremely complicated. Plus, I just use system(). How can I have the info return to my pipe? The following is my not working version, but you probably can see my thought:
"ssh -i /home/keys/student email@example.com > /home/output/getip.out"
fp = popen(cmd, "w");
I don't know how to have the info post to my getip.out
"C:\\ok\\plink.exe -i C:\\ok\\keys\\student.ppk firstname.lastname@example.org > C:\\ok\\output\\getip.out"