GIDForums  

Go Back   GIDForums > Computer Programming Forums > C Programming Language
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 12-Oct-2003, 22:33
Ristar Ristar is offline
New Member
 
Join Date: Oct 2003
Posts: 1
Ristar is an unknown quantity at this point
Unhappy

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


CPP / C++ / C Code:
#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(file1,"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();
}
 
 

Recent GIDBlogPython ebook by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading from file jmenendezr C++ Forum 2 26-Feb-2006 16:00
Limited file size.... lament Apache Web Server Forum 2 31-May-2004 13:35
Can an SWF file gather info? rhino1616 Graphics Forum 3 31-Oct-2003 12:10
How to search a huge text file for data? JdS MySQL / PHP Forum 7 27-May-2003 09:27
How Do i get php to find out the file type of a file for me? viperman95833 MySQL / PHP Forum 2 08-Mar-2003 09:48

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 20:18.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.