HI guys.
Im a student and studying c++ that and cmd and so far i stil havent figure out how to change my current dir while my program is running.
My program is that i want to make a test.txt file with a "my test file" inside it , in the drive c: directory
#include<stdio.h>
#include<stdlib.h>
void changedir()
{
//system("cd c:"); doesnt change my dir
//system("c: "); doesnt change my dir
}
void main(){
//changedir(); //change dir that doesnt work.
system("echo my test file > test.txt"); //writes my test file inside the test.txt file.
//getche();
}