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

Home Posts Topics Members FAQ

Can Anyone Help

6 New Member
hi there,

could any1 tell me how i would parse information that is being stored in a string into a class?

basically we are searching through a file and extracting the line of comments and storing the contents in a string. i may find several lines of code so im not sure how many strings i will have. Then i need to extract the contents in each string and display it as a list in a class

im using Dev C++ version 4.9.9.2

thanks for your help
Apr 25 '07 #1
3 1197
sicarie
4,677 Recognized Expert Moderator Specialist
hi there,

could any1 tell me how i would parse information that is being stored in a string into a class?

basically we are searching through a file and extracting the line of comments and storing the contents in a string. i may find several lines of code so im not sure how many strings i will have. Then i need to extract the contents in each string and display it as a list in a class

im using Dev C++ version 4.9.9.2

thanks for your help
I'm not sure I understand your assignment - "display it as a list in a class". There exists a string class already, are you supposed to create a new class such as a HoldComments class, and have this contain a list, which would be the comments? Or are you just supposed to display the name of the class you have removed the comments from, and then display them?
Apr 25 '07 #2
neilio2j
6 New Member
yes basically what i want is to create a new class and have this new class to contain a list which would be the comments

thanks
Apr 26 '07 #3
gpraghuram
1,275 Recognized Expert Top Contributor
HI,
Then you should have a class like this containing a vector oor list of strings.
Expand|Select|Wrap|Line Numbers
  1. class Store
  2. {
  3. list<string> comment;
  4. };
  5.  
Create a a object of the Store class and start storing the comments into the member comment.

Thanks
Raghuram
Apr 26 '07 #4

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

Similar topics

2
2060
by: J. Nielsen | last post by:
I'm not a programmer and I don't have the time and energy to start learning right now So I need some help. Let's say I have made an HTML Table (consisting of three columns and six rows). In each cell, in the first column I have put in an image (six different ones). In the second column I have merged all six cells into one cell and there put...
14
4611
by: vic | last post by:
My manager wants me to develop a search program, that would work like they have it at edorado.com. She made up her requirements after having compared how search works at different websites, like eBay, Yahoo and others. This is what she wants my program to be able to do: (try this test at different websites just for fun). At eBay: -...
6
2079
by: Kartik | last post by:
Hello, I was trying to develop a game in c++ ( text mode ), but I couldn't figure out how to make rest of the elements moving in the game while waiting for the player's input, or, how to accept the player's input in the game. I had visited many sites having c++ tutorials but no one gave enough explanation about this. an anyone please help me?
2
3583
by: pratchaya | last post by:
This is my sample error in my MySQL Log New value of fp=(nil) failed sanity check, terminating stack trace! Please read http://www.mysql.com/doc/en/Using_stack_trace.html and follow instructions on how to resolve the stack trace. Resolved stack trace is much more helpful in diagnosing the problem, so please do resolve it Trying to get...
8
3143
by: CM | last post by:
Hi, Could anyone please help me? I am completing my Master's Degree and need to reproduce a Webpage in Word. Aspects of the page are lost and some of the text goes. I would really appreciate it. The link to the document is http://www.surveymonkey.com/s.asp?u=689952259313 I have spent 15 hours trying to sort this but to no avail.
6
1247
by: placid | last post by:
Hi all, I'm looking for anyone who is working on a project at the moment that needs help (volunteer). The last project i worked on personally was screen-scraping MySpace profiles (read more at the following link) http://placid.programming.projects.googlepages.com/screen-scrapingmyspaceprofiles but that didn't go all to well, so im...
6
4484
by: theintrepidfox | last post by:
Dear Group I've installed MSSQL 2005 STD on Vista and now can't attach my databases. I've installed SQL SP2 and the SQL Vista Beta Update. The error I'm getting is: Unable to open the physical file <Path to MDF>. Operating system error 5: '''5(Error not found)'''. (Microsoft SQL Server, Error: 5120)
11
1964
by: Ken Fine | last post by:
I am using VS.NET 2008 and like it a lot. One of the very few things I don't like is a bug that seems to spawn literally thousands of   strings, one after the other, on design view changes. Sometimes I will end up with as many as 30,000 of them. I have to do a "Replace" which is slower than I'd like. This is slowing down my work a lot. This...
0
1009
by: canadianbacon | last post by:
Hi, I don't even know if this is the right place to post this but i will, because I need help. I'm trying to finish this basic game. but I am having troubles. If anyone wants to help me out it would be great. I will admit this might take a long time, i am new to java and i suck at it(yes i will also admit that). by anyones standards this...
1
3143
by: sklett | last post by:
I need to bang out a quick application to extract CCITT compressed TIF images from a ton of PDFs. I've used PDFSharp in the past to work with PDFs but ti doesn't have support for the PDF /CCITTFaxDecode filter. I've googled for the obvious terms to try to find some code samples or information about how to accomplish what I want but haven't...
0
7518
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
7444
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
7711
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. ...
1
7467
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5367
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5085
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...
0
3497
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1932
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
755
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.