Hello. Ok, so for this program I have to read in an html file, gather all html tags ( ie: <html> <font> </i> etc.. ) and add them to a queue in which they will be printed out later. Opening the the file is easy, it's after that I'm a little stumped on. Would the most efficient way of scanning through the file and adding the tags into the queue be with fgets?
Savage221 0 Newbie Poster
Recommended Answers
Jump to PostYou shouldn't worry too much about efficiency yet. Just work on getting it functional. :) As for the functional part, pulling HTML tags from a file can be tricky for the general case. Probably the safest way is to walk through every character and build each tag individually before storing …
Jump to PostHello. Ok, so for this program I have to read in an html file, gather all html tags ( ie: <html> <font> </i> etc.. ) and add them to a queue in which they will be printed out later. Opening the the file is easy, it's after that I'm a …
Jump to Post>Do you really need a queue?
Well, the tags are being stored anyway, and since there's going to be a balance checking step, it makes sense to store them in the order that they were found. Thus, a queue. :)>It sounds logical, I just can't figure out how …
All 9 Replies
Narue 5,707 Bad Cop Team Colleague

iamthwee
Savage221 0 Newbie Poster

iamthwee
Savage221 0 Newbie Poster

iamthwee
Narue 5,707 Bad Cop Team Colleague

iamthwee
Savage221 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.