操作系统-day05-p是地址变量,p是地址变量,p是地址变量

char *p 不是指针,p是地址变量

char *p 不是指针,p是地址变量

char *p 不是指针,p是地址变量

函数声明时,末尾加分号,否则报错重复定义

void putfont8_asc(char *vram, int xsize, int x, int y, char color, char *string);  /*正确*/	

void putfont8_asc(char *vram, int xsize, int x, int y, char color, char *string)  /*漏了分号,报错重复定义*/

函数内部调用其他函数时,直接传参,不要加数据格式

void putfont8_asc(char *vram, int xsize, int x, int y, char color, char *string)
{
	extern char hankaku[4096];

	for( ;*string != 0x00; string++){
		putfont8(vram, xsize, x, y, color, hankaku+(*string)*16);	/* 函数调用时,直接传参数,不要加数据类型*/
		x+=8;
	}

	return;
}
posted on 2026-05-31 18:42  中年二班  阅读(11)  评论(0)    收藏  举报