我是黑体字
我是微软雅黑
我是华文彩云
color=#0099ff size=72 face=“黑体”
color=#00ffff
color=gray
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
char buf[1024];
FILE *pf = fopen("11.txt","r+");
if(pf == NULL)
exit(-1);
int line = 0;
while(fgets(buf,1024,pf) != NULL)
line++;
rewind(pf);
char **p = (char**)malloc(sizeof(char*)*(line+1));
memset(p,0,sizeof(char*)*(line+1));
char **sp = p;
int len = 0;
while(fgets(buf,1024,pf) != NULL)
{
len = strlen(buf);
*sp = (char *)malloc(len+1);
strcpy(*sp,buf);
*sp++;
}
*sp = NULL;
fclose(pf);
sp = p;
while(*sp)
{
printf("%s",*sp++);
}
return 0;
}