Come faccio a fare l'allocamento automatico della stringa
(L'allocamento deve essere fatto nel ciclo for...)
Come Faccio ??? a far si che la mia stringa diventi di dimensione variabile ???
codice:int main() { char *str; getLine ("a", str); return 0; } char *getLine (char key, char *boot_com) { boot_com[0] = key; for (i=1; boot_com[i-1] != '\n'; i++) { boot_com[i] = getche(); } boot_com[i] = '\0'; }