i am writing a simple program but i have a little problem.
I must lanch a simple system("...");
example
system("dir");
Automatic prompt execute a normal command "dir" e show output in prompt's window. I need to capture the output of command dir (or similar command) and put it in a string var or similar.
using system is frowned up for a number of reasons, but if we are throwing caution to the wind you could redirect the output of the system call to a file, and then read that file from within your program like so.
i have made a socket by WinSock and until here it is all ok
but if i sent a string from server to client when i'll read it the output is corruption in ASCII
example
if i send "dir", client's printf is "à'2" but in system(...) it exacute right...i think that it is a conversion problem from byte to Ascii.