hi guys i want to make a c program,what it has to do is to find its current pathname every time it is executed from diferent locations and then redirect the outcome in a .txt file,through cmd.I have lack of knowledge when it comes to cmd so any help?
Dear libathos, system function call is work with Windows also...so it will not be a problem.
If you are having a static string as command like "pwd" you can directly have it in system() call. If, otherwise you want to include any variable then you can use sprintf before it.
sprintf(command, "nbtstat -A %d.%d.%d.%d" ,a,b,c,d);