char c = cin.get(); //接收回车 char dir[40]; cin.getline(dir, 40); ofile.open(dir,ios::app); if (_access(dir, 0) == -1) //系统自带功能判断路径是否有效 { } else { //d:\\test.txt\cout << \已经保存全部信息。\ofile << \姓名\<< setw(10) << \性别\<< setw(10) << \配偶\<< cout << \输入路径不存在!\return; setw(10) << \出生地\<< setw(10) << \生日\<< setw(10) << \学历\<< setw(7) << \工作\父亲\健在\ Node *tree[20]; int top=0; while(root!=NULL||top!=0) { while(root!=NULL) { 45 ofile<
47 cout << \输入路径不存在!\return; 工作 父亲 健在 ifile>>root->data.name>>root->data.sex>>root->data.spouse>>root->data.birthPlace>>root->data.birthDay>>root->data.education>>root->data.job>>root->data.father>>root->data.life; } i--; for(int j=0;j #include