473,548 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Searching a C++ file for keyword

6 New Member
mmm...I'm a fresh student learning programming, C++.
Now im facing a problem in designing a program.

The following is my problem,hope somebody can help me out!

(1) i have few text files, my program has to search a key word from those files and also count how many times does the word appear in the file. How should i do?

(2) How to create a file and read the contents to do the operations as mentioned above.

Hope somebody can show me....Thanks for advance!
Sep 21 '06 #1
1 1671
Niheel
2,456 Recognized Expert Moderator Top Contributor
Hi there,

Thanks for joining our community, I will move this question to the right forum. For future reference, posting in the right forum using the right titles will increase chances of getting a positive reply.

KUB
Sep 22 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1545
by: Chris Chandler | last post by:
Hello I am developing a web application that uses full text searching quite extensively. This is ideal where I am searching a large number of large varchar fields for a set of key words. My problem is that each user on the site has a number of keywords in the database (approx 200000 users) and when I add a new item with the large...
3
1301
by: Ratnakar Pedagani | last post by:
Hi, I'm implementing a job portal project. A employer will enter the site and search for the job seeker's resume by typing the keyword provided in the web form in the form of text box. I need able to search this keyword in different resume's present in my system and retreive the matched files. Any help or reference would be appreciated.
3
1407
by: Antoine Junod | last post by:
Hello, I definitely have a problem to build a clean data structure. I would be very happy if some of you could help me as well as in the past. Here is my problem: -> I have a list of keywords. -> I would like to link each keyword with a string. -> I should be able to access the string of a given keyword via that keyword.
1
3489
by: Maheshkumar.R | last post by:
Hi all, I'm new bie to windows application..i want to search a key word inside a file..let say, if a file contains text "this is sample program...". If i search "sample" inside a file, it should give the exact matching. ------my code FileStream fs = new FileStream("C:\\a.txt", FileMode.Open, FileAccess.Read); StreamReader fs1 = new...
7
2608
by: pbd22 | last post by:
Hi. I am somewhat new to this and would like some advice. I want to search my xml file using "keyword" search and return results based on "proximity matching" - in other words, since the search string will often not produce a direct match, the results will be based on proximity (50%, 20% 100%, etc). are there any good examples out there...
0
1426
by: daveleominster | last post by:
I am trying to read in a XML file into to vb.net say I have a text box and I am searching for a command "Aname" I enter the text and push the button, I want my syntax info and summary info to appear on the next form in a two separate list box. So I am thinking a loop and if statements are need. What do you suggestion for the vb code Next if...
3
2710
by: dittiman | last post by:
Hi everyone, here's what I need to do... I'm working on a windows application with c# I have a table with a list of keywords. The user will be selecting a word document from his computer. Once the document has been selected, I want to search the document for the keywords I have in another table. Once I find a key word, I want to add it to a...
3
3075
by: danielleissy | last post by:
Firstly i would like to know the difference between Keyword searching using SQL and partial matching of a search. I have to search for a book by key word in the book title. But allow TWO key words in the Query. This is what i have: SELECT * FROM Books WHERE Title LIKE '*Nature*' OR Title LIKE '*Britain*';
3
275
by: Daniel Fetchinson | last post by:
Does Python 2.5.2's embedded SQLite support full text searching? Sqlite itself is not distributed with python. Only a python db api compliant wrapper is part of the python stdlib and as such it is completely independent of the sqlite build. In other words, if your sqlite build supports full text searching you can use it through the python...
1
2770
by: alamodgal | last post by:
hiiiiiii I have a problem in highlighting searching keyword.Actually im using this function for searching Public Function HighLight(ByVal Keyword As String, ByVal ContentFor As String) Dim objHighLight As New highlight(Keyword, "<span class='searchKeyword'>{keyword}</span>") ContentFor = objHighLight.process(ContentFor, False,...
0
7512
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7438
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7707
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7951
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7803
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6036
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5082
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1926
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
751
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.