Ok.. I fooled around and found the error. Nobody has to test it, unless you like debugging.
Type: Posts; User: Killroy
Ok.. I fooled around and found the error. Nobody has to test it, unless you like debugging.
Last year I had to make this nice program that makes XML out of a text-file. I succeeded. This year I got a new sourcefile which enables me to make much better XML files. I rewrote the code from...
btw... fixed the problem, and I understand your code (which is more important to me)
Quzah wrote
You're trying to replace the text incorrectly. First off, do you mean to have an array of character pointers? Or is that just supposed to be a buffer?
That is indeed my fault.. I...
I am having some problems on this one.
I want to read a text and everytime that it reads the word "test four", I want to replace it with the word "view five".
I came up with this code, using...
K.. Thnx for the tip. Might wanna pass that URL over to my boss.. His programs are full of it ;)
@ Salem..
Thank you for taking a look at it. Your code was inspiring and helpes me to solve this problem and write the program.
@ Quzah
Maybe you were right and I was overcomplicating, but...
Hmm... obvious.. I am like complaining about massive core dumps, you have to be nuts to even compile this program and run it. :D
K.. fixed the problem.. no more errors, just some massive core dumps. I mean really massive, the systemadministrator already passed by.
Ayone an idea what I do wrong? I also placed a testfile.. You...
Nope.. i do not really think that is what I want to do.
Good to share some light on this matter, now lets dig in it one more time, perhaps it has opened my eyes.
This better?
I first wrote this program on this problem, but i get stuck on one error, which I simply can't solve..
An error in the line:
** if (strcmp (Name, nameDefinitions[idx].Name) == 0)...
Thank you for the tip.. it will sure and help me to get to a higher level programming this. Maybe I am not doing it the right way, but i am learning and eventually i will get there.
Thought it could be a bit simpler than this code on which I get stuck for some weeks, with lots of effort..
I first wrote this program on this problem, but i get stuck on one error, which I simply can't solve..
An error in the line:
** if (strcmp (Name, nameDefinitions[idx].Name) == 0) **
Saying...
K.. but how do I tell C that if it finds "xx" it should read form the buffer??
How can I say: If you find "xx. " then fscanf everything (including spaces and/or tabs) untill you reach a ":" and...
Ok.. thanx for the info. I now see your point on why I should use fgets and not fscanf. I did some practise on it. Can scan a text for a single char and replace with another..
However, How do I...
Ok pretty much a newby in programming in C. Can read some data and put it in structures. Just the basic stuff that I had to do and learn at University. However, I now have to write XML in C. I am...