Captain: Sharmin

11/06/06
bu4035

Today's topic

-second part of Search engine

Q1b) Run the above program with a file that contains names of files. Program opens each file and search for the particular search in the question. Show your data file as well (13 pts)

- your geocities should have an index which prints to your tutorial system for that reason you might have dedicated site than your.  personal site that has your assignments and questions nice name. I want to be able to see your project as well as your test questions

the reason I'm focusing as because your web system project should have search interface.  " a little box where you can enter the keywords such as if object, loop, file and gets you to the information. 

Question:

How would you get a input box?

<input type=text, size.....>

Where is the name of the program?

-put the executable name in the action of  portion of the form explain on Wednesday(CGI)

Hamed's Search Program

#include<iostream>

#include<fstream>

#include<string.h>

using namespace std;

int main(){

char searchname[30], name[30], email[30];

int result;

while (1){

result=0;

cout<<"ENTER THE SEARCH NAME:";

cin>>searchname;

ifstream fin("email.txt");

while(fin>>name>>email){

if(strcmp(searchname,name)==0){

cout<<email<<endl;

result = 1;

} // end of if

} // end of loop

if (result == 0 )cout<<"NAME NOT FOUND"<<endl;

fin.close;

}//infinite loop

return 0;

} // end of main

 

Geocities.com

cplusplus tutor

cpptutor

cppteacher

cpplearn

 

the next scenario should be second part of question of each student