Nonostante :codice:for (int i=0; i<fileDim; i++) { cout << "carattere: "; cout << buff[i]; cin.get(); s +=buff[i]; cout << s; cout << "\n"; if (buff[i]==0x0A) { n++; } } //------------------ cout << "stringa: "; cout << s; cin.get(); //{ char str[] = s; char * pch; printf ("Splitting string \"%s\" into tokens:\n",str); pch = strtok (str," ,.-"); while (pch != NULL) { printf ("%s\n",pch); pch = strtok (NULL, ","); } //return 0; cin.get(); //}
cout << "stringa: ";
cout << s;
cin.get();
mi stampi a video correttamente la stringa creata dalla congiunzione dei diversi buff[i] trovati compreso le virgole... non riesco a "tokenizzarla" ... in quanto da questo mio codice
ottengo dalla riga:
char str[] = s;
il seguente errore:
velocita13.cpp initializer fails to determine size of `str'
Come posso rimediarvi?
grazie
![]()

Rispondi quotando