I want to write a code which find all the lines starting with #include and write those files separately into another file.My main task is to find the names of all the include files and write them in a seprate file.
This is quite clear that we need to open and read this file using basic IO operations.After then i think using strtok function we can parse different strings between # (as include start with #), but i find this not a proper way.because in doing so we need to have array pointers which are needed to be initialized and there may ne n numbers of included files in the main file(if we take them recursively, means a include file can also have include files).
Need suggestions.