Trying to print a data file with words and numbers
Hi, I'm trying to create a menu for a program by printing a data file. This is what it looks like
WELCOME TO MAZE-RUNNER DEMO
THIS IS NOT YOUR MAZE RUNNER! This is a demo of possible Maze Runner Levels.
The Levels are:
Level 0: Drive the Mouse.
You may use the a,s,d,w commands in the predefined
visible maze.
Level 1: Mouse Discovers
You may use Level 0 commands and r,l and m commnad
in the predefined hidden maze
Level 2: Mouse Explores
You may use Level 1 commands and the n command
Level 3: Da Frills
Not provided.
and i'm trying to print it like this
insert
Code:
#include<stdio.h>
#include "menu.h"
main()
{
int lvl = 100;
char f;
FILE *fp;
char words [100];
fp = fopen ("demo_intro", "r");
fscanf(fp, "%s", &f);
fprintf(fp, "%-100.100s",f);
}
I have never used fprint,fscan, or fopen before so I don't know how to use them at all. I am hoping someone will first be able to tell me if i can actually print that data file and secondly, teach me how to open and print it using code. Thank you a lot.