Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 132,690 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,306 people online right now. Registration is fast and FREE... Join Now!




Search Function

 
Reply to this topicStart new topic

Search Function, I need help creating a basic search function in C

almostacoustic
post 4 Sep, 2008 - 03:54 PM
Post #1


New D.I.C Head

*
Joined: 22 Jul, 2008
Posts: 6


My Contributions


Hey, this is for part of my final project in programming this sem, my teacher rejected my first option of how to search for something. I was planning on using a "searching by elimination" kind of thing. She wants me to do a search by string. The only thing is, she didn't tell us how to do that yet and she won't let us do a search in any other way. blink.gif

I don't have any code for this as I don't know HOW to code it in the first place. I don't need anyone to code it for me, I just need what libraries are necessary and a basic syntax guide for a simple string search. whatsthat.gif Thanks.
User is offlineProfile CardPM

Go to the top of the page

nirvanarupali
post 4 Sep, 2008 - 04:26 PM
Post #2


D.I.C Foot

Group Icon
Joined: 1 Aug, 2007
Posts: 983



Thanked 2 times

Dream Kudos: 375
My Contributions


Can you give more details? What do you mean by search?

1.) Is it a search a string in the file?
2.) Is it a search a filename in the specified directory?

First advise is, try to search here in the snippets sections.
User is offlineProfile CardPM

Go to the top of the page

almostacoustic
post 4 Sep, 2008 - 07:50 PM
Post #3


New D.I.C Head

*
Joined: 22 Jul, 2008
Posts: 6


My Contributions


Hmmm... I'm not really sure.
The program that we're supposed to be making is a program that locates parts of the human skeletal system, individual bones.

I'm completely new to searching for a string value in C.

The basic flow of the program would be..

CODE

Input from user --> Search database for matching terms --> output matching terms--> end

if the search term isn't found in the database, the program would output the most similar terms.


That's what our teacher told us to do to make it "simpler". Well, for the end user maybe, but not for us. I have no inkling of how to code something like this.
User is offlineProfile CardPM

Go to the top of the page

Reply to this topicStart new topic
Time is now: 11/23/08 07:39AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month