Ciao a tutti.
Ho appena incominciato a programmare. Sto realizzando un programma in c++ e dovrei caricare uno script.
Ecco il mio programma:
Girando su internet ho trovato la funzione system. Dovrebbe caricarmi lo script mkdfa.pl. Ma appena lancio il mio programma, dopo aver schiacciato il tasto n, il programma mi crea i due file sample.grammar e sample.voca e poi mi dice:codice:#include <cstdlib> #include <iostream> #include <fstream> #define MAX 60 using namespace std; int main(int argc, char *argv[]) { char a, prompts[60][60], s[100]; int j=0,i=0; cout << "Inserire:" << endl << "Nuovo Profilo (Premere n), salvare profilo (premere s) Lanciare profilo (premere r) uscire (premere q)" << endl; cin >> a; if (a=='n') { ofstream fout ("sample.grammar"); fout << "S : NS_B COMANDO OGGETTO NS_E" << endl << "S : NS_B RICHIESTA NS_E" << endl; fout.close(); ofstream fout2 ("sample.voca"); fout2 << "% NS_B" << endl << "<s> sil" << endl << endl << "% NS_E" << endl << "</s> sil" << endl << endl << "% COMANDO" << endl << "ACCENDI a cc e n d i" << endl << "SPEGNI s p e ggn i" << endl << endl << "% OGGETTO" << endl << "LUCE l u c e" << endl << "TEIERA t e j e r a" << endl << endl << "% RICHIESTA" << endl << "AIUTO a j u t o" << endl; fout2.close(); //ifstream fin ("C:\cygwin\home\Ciucci\voxforge\auto_ita\prompts"); /*while (fin.good()) { fin>>promts[i][j]; }*/ //system(mkdfa.pl sample); } system("PAUSE"); return EXIT_SUCCESS; }
"." non è riconosciuto come comando interno o esterno, un programma eseguibile o un file batch.
Potete aiutarmi?!
Un saluto

Rispondi quotando