funs.c

来自「1、链接存储方法  链接方式存储的线性表简称为链表(Linked List)」· C语言 代码 · 共 36 行

C
36
字号
/*
 * 作者:antigloss
 * 最后修改:05-8-31 19:30
 * 蚂蚁的 C/C++ 标准编程
 *    cpp.ga-la.com
 */

#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include "../header/funs.h"

/* begin of error 05-8-15 18:40 */
void error( char *fmt, ... )
{ /* 输出错误信息,退出程序 */
	va_list args;

	va_start( args, fmt );
	fprintf( stderr, "error: " );
	vfprintf( stderr, fmt, args );
	fprintf( stderr, "\n" );
	va_end( args );

	exit( -1 );
}  /* end of error */

/* begin of flush_stdin 05-8-31 19:30 */
void flush_stdin( void )  /* 清空“输入缓冲区” */
{
	int c;

	if ( !feof(stdin) ) {
		while( ( c=getchar() ) != '\n' && c != EOF )
			;
	}
} /* end of flush_stdin */

⌨️ 快捷键说明

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