help needed in c!!

Joined
Aug 25, 2007
Messages
79
Reaction score
0
hi, i need some help in c. At the moment i have some c code that goes to a text file and print off the lines on to a lcd. I was just can you read a html file instead of a text file??? here is how i read the text file...

f1 = fopen("some.txt","r");
while(!feof(f1))

{

fscanf(f1,"%[^\n]\n",line1);

fscanf(f1,"%[^\n]\n",line2);

fscanf(f1,"%[^\n]\n",line3);

fscanf(f1,"%[^\n]\n",line4);


any ideas are welcome. thanks.
faz
 

Ian

Administrator
Joined
Feb 23, 2002
Messages
19,873
Reaction score
1,499
I've moved this to the programming forum.

Yes, I don't see why you couldn't read an HTML file, just change the line with .txt in it to html:

Code:
f1 = fopen([color=#a31515]"some.html"[/color],[color=#a31515]"r"[/color]);

However... the problem will be that it shows the HTML code and not the parsed HTML. Doing that would be MUCH more complicated, and beyond the scope of my coding skills :blush:
 
Joined
Aug 25, 2007
Messages
79
Reaction score
0
o didn't know there was a programming forum, lol. Thanks for moving it.
I see, so i be able to read the html but all the code, which i don't what. I guess i have to think of another way around this problem. Thanks anyway.
 

Ian

Administrator
Joined
Feb 23, 2002
Messages
19,873
Reaction score
1,499
What is it you are trying to do, as there may be another way round it :)
 
Joined
Aug 25, 2007
Messages
79
Reaction score
0
Dont worry because i solved it!! i wanted to read html with a rss on it and then use the c code i have to download that to my lcd. However i worked out a way to use javascript to download the rss and put it in to a text file. And since i already know how to get data from a text file to the lcd using my c code, i solved it.:) Thank you for offering tho!:thumb:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top