c - How do I Extract a part of a line from a file? -
i'm new c, sorry if dumb question let's have file containing following:
1 abc 2 def 3 ghi
if pass in integer 3 (or character?) function return string of "ghi". don't know how make happen.
void testfunc(int num) { file *fp; fp = fopen("testfile.txt", "r"); if(strstr?????? }
yea.. have no idea i'm doing. can offer guidance?
you can follow link, can bit google also. simple should try own once. reading c file line line using fgetc()
Comments
Post a Comment