Stacks, classes, HTML tags, and parsing.

This is a discussion on Stacks, classes, HTML tags, and parsing. within the C++ Programming forums, part of the General Programming Boards category; Well, let me describe the assignment: You are given a basic HTML file and must create a program that will ...

  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    16

    Stacks, classes, HTML tags, and parsing.

    Well, let me describe the assignment:

    You are given a basic HTML file and must create a program that will parse the file and check for:

    Tag Validity
    Proper tag nesting

    A class for the stack and html tags must be used. The interface and implementation for the stack and html tag classes must be in different files (for a total of 5 files, a main.cpp, stack.cpp, stack.h, htmltag.cpp, htmltag.h).

    Included in the post is my uncompleted code as I get wierd errors and am probably doing something wrong in general. I also need to figure out to make it work fully and support more tags.

    Any help you can provide would be appreciated as I need to have the assignment in by 10:10 AM tomorrow morning.

    Thanks to everyone who helps ^_^
    Attached Files Attached Files

  2. #2
    'AlHamdulillah
    Join Date
    Feb 2003
    Posts
    790
    uhm, you did read the FAQ right, no giving answers for homework is one of the rules.

  3. #3
    Registered User
    Join Date
    Sep 2003
    Posts
    16
    ...

    I don't want a direct answer containing code, just conceptual suggestions. Obviously I am missing something, and just need a little push in the right direction.

    This place was so helpful when I did my first assignment, but now it's like "don't help, he won't learn anything." I realize that I need to do this myself, but since I don't have anyone else from my class around to help me figure out what to do, I thought I could ask here. And I do learn from other code, but I haven't found anything that will help me.

  4. #4
    Senior Member joshdick's Avatar
    Join Date
    Nov 2002
    Location
    Phildelphia, PA
    Posts
    1,146
    Members don't like non-specific questions like you've posted. If you're having a problem, post a specific question and the code involved. You're unlikely to get many responses from "Please look over all of my code from several different files and fix it all for me."
    FAQ

    "The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.

    "If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.

  5. #5
    Registered User jlou's Avatar
    Join Date
    Jul 2003
    Posts
    1,088
    Sorry, don't have time to look at your code. I would ask, is your Stack class working with a simple sample? How about your reading and writing of files? Have you figured out how to read in the next HTML token? Have you figured out how to verify that a token is valid? Each of these seem to be logical steps to me, so maybe you can shed light on which one you are having trouble with.

  6. #6
    Registered User
    Join Date
    Sep 2003
    Posts
    16
    My stack class works perfectly on simple examples.

    I'll take those questions into consideration when I re-write my main.cpp and see what happens.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21