When printing in the console displays the message "'path' is currently being prepared"

case 5: if( ( Fz = fopen( File_Zap, "rb" ) ) == NULL ) { puts( "\n Open ERROR! Press any key!" ); getch(); continue; } printf( "\n\tGroup number" ); printf( "\n\n\t" ); scanf("%d", &n_gr_print); printf( "\n\tMark" ); printf( "\n\n\t" ); scanf("%d", &s_b_print); Fz = fopen( File_Zap, "rb" ); D_f = fileno( Fz ); len = filelength( D_f ); kol = len / size; mas_Z = new TZap[kol]; for( i = 0; i < kol; i++ ) { fread( ( mas_Z + i ), size, 1, Fz ); } fclose( Fz ); for( int i = 0; i < kol; i++ ) if(mas_Z[i].n_gr == n_gr_print && mas_Z[i].s_b > s_b_print) { printf("\n\t%s;", mas_Z[i].FIO ); k_print++; fprintf( Ft, "\n FIO = %s,\n Year of birth = %d,\n Group number = %d,\n Physics = %d,\n Mathematics = %d,\n Computer science = %d,\n Chemistry = %d,\n Mark = %1f\n\n\t", mas_Z[i].FIO, mas_Z[i].god_r, mas_Z[i].n_gr, mas_Z[i].ocen_fiz, mas_Z[i].ocen_mat, mas_Z[i].ocen_inf, mas_Z[i].ocen_him, mas_Z[i].s_b ); } printf("\n"); if(k_print == 0) printf("\n\tNo information"); else { fclose( Ft ); system("print rezult.txt"); Ft = fopen( File_Rez, "a" ); } delete []mas_Z; break; 
  • Okay, let him withdraw. And the problem is what? What does the debugger say? - iksuy
  • @IKSUY Everything works, my printer does not print and displays the message in the console. system ("print rezult.txt"); - is this a printout? - aaa
  • one
    And you run print rezult.txt manually, and see what happens. Maybe you are in the wrong directory, who knows. - VladD
  • @VladD via cmd so can not initialize the PRN device. The right way - aaa
  • one
    print - is that a general command? What OS are you working in? If in Linux. then to print the file from the command line, use the command like "lpr -P <Printer name in the system> <Name of the file being printed> - Sergey

0