added more code
This commit is contained in:
@ -0,0 +1,27 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
printf("Hello, World!\n");
|
||||
FILE* mazeFile; /* Maze Input File */
|
||||
char c; /* Holds character for line input from file */
|
||||
int row; /* Holds number of rows for input from file */
|
||||
int col; /* Holds number of cols for input from file */
|
||||
if (argc != 2)
|
||||
{
|
||||
printf("An error has ocurred no input file was given.\n");
|
||||
return 1;
|
||||
}
|
||||
mazeFile = fopen(argv[1], "r");
|
||||
if (mazeFile == NULL)
|
||||
{
|
||||
printf("Error in opening the file.\n");
|
||||
return 1;
|
||||
}
|
||||
fclose(mazeFile);
|
||||
printf ("So this line won't print without an argument.\n");
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user