0 Replies - 711 Views - Last Post: 19 August 2008 - 03:01 PM Rate Topic: -----

#1 T&T   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 19-August 08

I have some question about this project

Posted 19 August 2008 - 03:01 PM

Hello ,

Chould you answer my question about the attached project.

1. I face problem in updating the reservation number whenever I reexcute the programme.(It returns its initial value).

2. how can I scan all the text file in the system ( what is the condition or function I shoud use ) "this is required in 5 &6". I use this code but it does not work.

void Print_allPass()
{
	FILE *infile;

	char ID[5]="0000",temp[20],line[100],*status;

			
		while( ( strcmp(ID,"0000") > 0 ) && ( strcmp(ID,"9999") < 0) ){
		strcpy (temp ,"passenger");
		strcat (temp ," ");
		strcat (temp , ID);

		infile = fopen (temp,"r");

		status = fgets(line, 100, infile);
		 while (status != NULL) {
          
                                  puts(line);
                                 status = fgets(line, 100, infile);
                           } 
	          }
 }



I hope that you can help me ...

thank you...

** Edit ** :code:

Attached File(s)


This post has been edited by T&T: 19 August 2008 - 09:01 PM


Is This A Good Question/Topic? 0
  • +

Page 1 of 1