help. how to blank off when info from file...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ristar

    help. how to blank off when info from file...


    #include <stdio.h>

    #include <conio.h>

    #include <string.h>

    #include <stdlib.h>

    #include <windows.h>

    #define file1 "data.txt"



    FILE *read;

    char a[12]="A1";

    char b[4]="A2";

    char c[4]="A3";

    char d[4]="A4";

    char e[4]="A5";



    int main()

    {

    read=fopen(file 1,"r");

    if(read==NULL)

    {

    system("cls");

    printf("Cannot Open File");

    getch();

    }else

    {

    /*need help here



    if there is "A1" "A2" "A3" and "A4" in the data.txt, then make
    the program show only "A5" in its correct position. please edit
    it so that it can blank off any one string that appears in the
    data.txt and show all the strings in its correct positions.





    */

    printf("%s %s %s %s %s",a,b,c,d,e );

    }



    getch();

    }


    --
    Posted via http://dbforums.com
Working...