ok so here is my code and all im trying to make it do is make a.cong file and make sure the time n date is up to date. instead of it sayin on the date and time so it updates via computer time when exe is run. here is my code can u help me fix it please.
and how to i add " in myfile << "<?xml version=".1.0" standalone=""yes?>""\n";
Code:int main () { ofstream myfile ("settings.conf"); if (myfile.is_open()) { myfile << "<?xml version="1.0" standalone=""yes?>""\n"; myfile << "<DigiDNA>\n"; myfile << " <AppSettings>\n"; myfile << " <activationEmail />\n"; myfile << " <activationKey />\n"; myfile << " <registrationKey />\n"; //i want to add the curnt time / date on the computer where time and date is below myfile << " <beginDate4>2010-10-13T14:46:04.546875+10:00</beginDate4>>\n"; myfile << " <automaticalyCheckForUpdates>true</automaticalyCheckForUpdates>\n"; myfile << " <sendDebuggingInfosToDigiDNA>true</sendDebuggingInfosToDigiDNA>\n"; myfile << " <browseAppsFromRoot>true</browseAppsFromRoot>\n"; myfile << " <diskaidFolderCreated>true</diskaidFolderCreated>\n"; myfile << " <lastSelectedPlace>root-folder</lastSelectedPlace>\n"; myfile << " <lastSelectedFolder>/Applications/MobileMail.app</lastSelectedFolder>\n"; myfile << " <lastSelectedFolderViewType>Details</lastSelectedFolderViewType>\n"; myfile << " <showDialogMessageMediaFolder>true</showDialogMessageMediaFolder>\n"; myfile << " <showDialogMessageRootFolder>true</showDialogMessageRootFolder>\n"; myfile << " <showDialogMessageDeleteItem>true</showDialogMessageDeleteItem>\n"; myfile << " </AppSettings>\n"; myfile << "</DigiDNA>\n"; myfile.close(); } else cout << "Unable to open file"; return 0; }



LinkBack URL
About LinkBacks


