Se sono 87 (verificata dal cout << insiemedistringhe.size(); ) me ne salva solo 58 o 61...codice:for( int i=1; i <91; i++ ) { if( i!=valore1 && i!=valore2 && i!=valore3) { // scrivi il valore1, valore2, valore3, i su file cout << valore1; cout << ","; cout << valore2; cout << ","; cout << valore3; cout << ","; cout << i; s += intToString(valore1); s += ","; s += intToString(valore2); s += ","; s += intToString(valore3); s += ","; s += intToString(i); cout << "\n"; //cout << "stringa: "+s; cout << "\n"; //cin.get(); insiemedistringhe.push_back(s); //riazzero stringa... s=""; //------------------- } } cout << "\n\n\n"; //visualizzo intero vector prima di salvarlo su file... cout << "VISUALIZZA INTERO VECTOR..."; cout << "\n\n"; cout << "\n\n\n"; cout << "Press ENTER to continue..." << endl; cout << "\n\n\n"; cin.sync(); cin.get(); cout << "\n\n\n"; cout << "Dimensione vector insiemedistringhe: "; cout << insiemedistringhe.size(); cout << "\n\n\n"; ofstream fout; fout.open("quartinegenerate.txt", ios::app); //--------------------------------- //cout << "\nLETTURA E SALVATAGGIO IN FILE TXT DI TUTTO L'INSIEME DELLE SINGOLE COMBINAZIONI SEPARATE:\n\n"; for (int k=0; k<insiemedistringhe.size();k++){ cout << insiemedistringhe[k]+"\n"; fout << insiemedistringhe[k]+"\n"; } //--------------------------------
![]()
![]()
![]()
GRAZIE infinite
a chiunque mi risolve questo Xfile problem!![]()
![]()
![]()

Rispondi quotando
