urgent solution required for a C problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dineshchand
    New Member
    • Nov 2006
    • 19

    urgent solution required for a C problem

    /*
    Function ReadRealyLongTe xtLine() needs to be written by You which should be able to Read REaly very very very long line from a file (upto 30K) and return it
    Memory management has to be done by u .
    plz do post ur replies

    */

    char * ReadRealyLongTe xtLine(FILE* p_fhInFile)
    {
    }


    void PrintX(void)
    {

    char * strLineBuf;
    FILE* fhInfile;

    fhInfile = fopen("x.txt", "r");

    if(fhInfile)
    {

    while( (strLineBuf = ReadRealyLongTe xtLine(fhInfile )) != NULL)
    printf("\n%s", strLineBuf);

    fclose(fhInfile );

    }

    else
    printf("\r\nCou ld not find x.txt!!");
    }


    void main()
    {
    clrscr();
    PrintX();
    getch();

    }
Working...