Ok i want to save to the temp directory this is wat i have so far
ok i think problem is somthing to do with %USENAME%Code:#include <iostream> #include <fstream> #include <string> using namespace std; int main(){ int test (123); string line; ifstream omyfile; omyfile.open("C:/Documents and Settings/%USERNAME%/Local Settings/Temp/test.txt"); getline (omyfile,line); omyfile.close(); ofstream imyfile; imyfile.open ("C:/Documents and Settings/%USERNAME%/Local Settings/Temp/test.txt"); imyfile << test<<line; imyfile.close(); return 0; };
thx