Reading a file name from piped command
So I'm trying to get the C program to read a filename from the command line in the following format: cat (filename path) | (program name) i can get it to read the name of the input file when its entered as a command line argument, but it won't read from the concatenated argument here's the code, right now its reading the name of the file as if written after the program name on the command line. #include <stdio.h> #include <string.h> //initialize file pointer FILE *file; //initialize global variables #define DEFAULT_LEN 70 //main int main(int argv, char *argc[]){ //open File for reading file =