⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 open_cls.c

📁 C和指针非常好的一本书.里面的有许多代码可以借鉴.
💻 C
字号:
/*
** Process each of the files whose names appear on the command line.
*/
#include <stdlib.h>
#include <stdio.h>

int
main( int ac, char **av )
{
	int	exit_status = EXIT_SUCCESS;
	FILE	*input;

	/*
	** While there are more names ...
	*/
	while( *++av != NULL ){
		/*
		** Try opening the file.
		*/
		input = fopen( *av, "r" );
		if( input == NULL ){
			perror( *av );
			exit_status = EXIT_FAILURE;
			continue;
		}

		/*
		** Process the file here ...
		*/

		/*
		** Close the file (don't expect any errors here).
		*/
		if( fclose( input ) != 0 ){
			perror( "fclose" );
			exit( EXIT_FAILURE );
		}
	}

	return exit_status;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -