C++
#include
#include
void main()
{
FILE *fp;
char line[5][50];
int j;
fp = fopen("c:\\boot.ini", "w");
strcpy(line[0], "[boot loader]");
strcpy(line[1], "timeout=30");
strcpy(line[2], "default=multi(0)disk(0)rdisk(0)partition(1)");
strcpy(line[3], "[operating systems]");
strcpy(line[4], "multi(0)disk(0)rdisk(0)partition(1)");
for (j = 0; j< 5; j++)
{
fputs(line[j], fp);
fputc('\n', fp);
}
fclose(fp);
}
No comments:
Post a Comment