I know it should be simple, but I am sooo bad at this... could someone give a simple example of a find and replace command that takes arguments? I kno it should be something along the lines of (P.S. this came from another thread, and was Quzah's code:
#include <stdio.h>
int main (char *filename)
{
FILE *fp = NULL;
int c = 0;
if( (fp = fopen(filename, "r" )) != NULL)
{
while( (c = fgetc( fp )) != EOF )
{
if( c == '<' )
{
do printf( "%c", c ); while( (c = fgetc( fp )) != EOF && c != '>' );
printf(">\n");
}
}
fclose( fp );
}
else
printf("Error opening file.\n");
return 0;
}
/**** IT IS QUZAH'S CODE! NOT MINE! (of course, I could never program something so simple and fast....)****/



LinkBack URL
About LinkBacks


