我用TC3.O
编译连接时为什么老是提示:
错误 e:\progra~1\print_it.c 44: 类型不匹配在'do_heading'的宣告中
*** 1 错误在编译 ***
请问我应该如何改正?
/* print_it.c-This progams prints a listing with line numbers! */
#include <stdlib.h>
#include <stdio.h>
int line = 0, page = 0;
int main( int argv, char *argc[] )
{
char buffer[256] ;
FILE *fp;
if( argv < 2 )
{
fprintf(stderr, "\nProper Usage is: " );
fprintf(stderr, "\n\nprint_it filename.ext\n" );
return(1);
}
if (( fp = fopen( argc[1], "r" )) == NULL)
{
fprintf( stderr, "Error opening file,%s!", argc[1]);
return(1);
}
page = 0;
line = 1;
do_heading( argc[1]);
while( fgets( buffer, 256, fp ) != NULL )
{
if( line % 55 == 0 )
do_heading( argc[1] );
fprintf( stdprn, "%4d:\t%s", line++, buffer );
}
fprintf( stdprn, "\f" );
fclose(fp);
return 0;
}
void do_heading( char *filename )
{
page++;
if ( page > 1)
fprintf( stdprn, "\f" );
fprintf( stdprn, "Page: %d, %s\n\n", page, filename );
}