User Profile
Collapse
-
Hi donbock, thanks for your reply. I've changed the ("r") to ("r+") and tweeked the rest of the code to rewind and little and write. -
Search and replace char in same text file
Hi there,
I've got this piece of code, but I'm having trouble getting it to write the changes into the file.
What I'm trying to do is:- Read text file
- Find user specified character (eg. what to replace all the a's)
- Replace the character (eg. replace all a's with b's)
- Write to the same text file
...Code:#include <stdio.h> #include <string.h> #define MAX_LEN_SINGLE_LINE
-
Hi, sure! I've modified them all the documents slightly since my last post but here they are:
customer.xml:
...Code:<?xml version="1.0"?> <customers> <customer number="BL343456"> <meterNumber>134456</meterNumber> <name title=""> <firstName>Bart</firstName> <middleName></middleName>
Leave a comment:
-
Loop to next sibling
Hi I'm a bit new to XML, and I was wondering if anyone could help me with my problem.
I have one XML document (readings.xml) being linked to an XSLT document via JavaScript DOM, and am linking the another (customer.xml) through the select="documen t('customers.xm l')/customers/..." /> method in the XSLT document.
I have this XML document (customer.xml):
...Code:<customers> <customer
-
Hi there! Thanks a bunch for your quick reply.
Just wondering why you used PCDATA when declaring the elements
eg. <!ELEMENT make (#PCDATA)>
<!ELEMENT model (#PCDATA)>
instead of the others this website has:
I mean like how did you know to choose PCDATA for all of them?
Also thank you for the code that you've put up. =) Its really helpful....Leave a comment:
-
XML Element Content
Hi there, I'm new to writing XML (just a couple of weeks old) so please bear with me.
I was wondering when it would be the right time to use PCDATA in the DTD. I think there are another two data types? CDATA and ANY?
It says on this website that the difference between the two DATA ones is for parsing and I'm sure sure if in this context that thats what I'd like to do.
This is what I've got at the moment:... -
Sorry to double post, but I just wanted to add that I was using Microsoft Visual C++ 2005 Express for this. I've also checking it out using Dev-C++. So it doesn't seem like its a complier thing.
Can anyone help or just look at the code up there please?Leave a comment:
-
Reading an external csv file
Hi! I'm working on a piece of code for school. =) in C++. (I've read the rules and understand that i can't put all of the code here and ask for all of the code) I've got all (or most) of the code done.
I'm having trouble with the output.
I'm supposed to:- Enter a csv file (with info in it)
- Read the file
- Go through it one by one and sort it into a structure
- Sort it by the customer id (which is also used in the
No activity results to display
Show More
Leave a comment: