Hi,
Im starting this new thread because my other one was moved to c++ for some reason. Im trying to complete a project in C which allows me to "browse" for my text file, then use the program to read and then display the contents, which will later be used for calculations.
I dont really know where to start so I will post this code:
This code is a bit of a bodge of information I have found on the internet. Can anyone tell if this code is useable for what I want to do, and if not can you recommend a better code to allow me to do this?Code:#include <stdio.h> #include <stdlib.h> void main(int argc, char *argv[]) { FILE *fp; /* file pointer */ char ch; /* see if correct number of command line arguments */ if(argc !=3) { printf("Usage: find <filename> <ch>\n"); exit(1); } fclose(fp); }
Regards,
James



LinkBack URL
About LinkBacks


