473,399 Members | 4,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Using C++ To Search Directory

hi im currently using C++ for a project and was wondering if anyone could help me out with a problem i have encountered

basically i was wanting to search through a set number of files in a directory for certain tags or comments. after that i was hoping to search through all the files again that contained tags to find out if there was more than one tag in each file and display those files or tags in a list

thanks in advance for your help if you do so
Mar 23 '07 #1
3 2068
sicarie
4,677 Expert Mod 4TB
hi im currently using C++ for a project and was wondering if anyone could help me out with a problem i have encountered

basically i was wanting to search through a set number of files in a directory for certain tags or comments. after that i was hoping to search through all the files again that contained tags to find out if there was more than one tag in each file and display those files or tags in a list

thanks in advance for your help if you do so
What OS are you using?
How are the tags stored (as files? file attributes?)
What about comments?
What have you tried so far?
Mar 23 '07 #2
What OS are you using?
How are the tags stored (as files? file attributes?)
What about comments?
What have you tried so far?
The operating system i am using is WinXP Pro SP2

The tags are stored as comments within files. With the text "TODO" used as
our tag marker to show it is a tag. Once a tag has been found we wish to read the text after the "TODO" tag and put all the information after the "TODO" into a class.

So far we have tried to search through the the program itself for all information after the "TODO" tag and stored all the information into a string and printed all the text on the output screen.

thanks very much for your help
Mar 29 '07 #3
sicarie
4,677 Expert Mod 4TB
The operating system i am using is WinXP Pro SP2

The tags are stored as comments within files. With the text "TODO" used as
our tag marker to show it is a tag. Once a tag has been found we wish to read the text after the "TODO" tag and put all the information after the "TODO" into a class.

So far we have tried to search through the the program itself for all information after the "TODO" tag and stored all the information into a string and printed all the text on the output screen.

thanks very much for your help
The 'TODO' starts the comment, but is there a definite end delimiter? As is, I believe you're going to need to use fstreams, getline, and strtok to find the 'TODO' tag.
Mar 30 '07 #4

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

Similar topics

3
by: Stephen Ferg | last post by:
I need a little help here. I'm developing some introductory material on Python for non-programmers. The first draft includes this statement. Is this correct? ...
3
by: Peter Schwalm | last post by:
I'd like to modify the python search path depending on the source directory of the script being started. The reason is: I use a version control system, and the python scripts and modules are...
0
by: mm | last post by:
Can someone with Win 2K please help me here. Best yet, can some MVP duplicate it and report it to MS. I can't find any reference to this issue on the Web, or in MS Knowledge Base. I have been...
2
by: Patrick | last post by:
Are the differences between a search engine, a subject directory and a meta search engine significant for an ebusiness web site owner? A meta search engine merely uses ordinary existing search...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
0
by: Johan | last post by:
Hi How do I preform a paged search using the Directory searcher in VB.NET? I'm getting the first 1000 entries in the AD when I'm doing a normal search using the Directory searcher, and then...
5
by: Dhans | last post by:
Framework version : 1.1 For a given directory (which may have subdirectories), I need to identify the number of text files (*.txt). For this I have tried recursive method to search files, it...
6
by: Derek Hart | last post by:
I bring in an xml file into vb.net by using xmlDoc.LoadXml(XMLString) - I run xpath statements against the xml file to grab data from it, so I use, as an example, //Vehicles/Vehicles/@make to get...
3
by: Franky | last post by:
Been having a problem using a treeview. Work great the first time the form containing it is entered but not the second time. Took a while to create a small sample that exhibits the problem, but...
3
by: interuser | last post by:
Hi I want to enumerate all groups of an active directory. How do I do that? Thanks
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...

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.