#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    Ireland
    Posts
    26
    Rep Power
    0

    run time error...


    Can someone please tell me what is wrong with this:
    void S_S_Processor::process_tag_path_var(string tp_strng)
    {
    Tag_Path tp1 = Tag_Path();
    start_tp.add_child(&tp1);
    }

    where Tag_Path is a linked list type variable.
    where start_tp is a Tag_Path global variable.

    The Tag_Path class is fine. Hell my entire code compiles fine, but it will not execute
    properly. It runs into problems have way through running it.

    Am I not allowed to create a local variable in a method, and add a pointer to it to the
    global variable? Is that it? Please advise....




    http://www.johnathangaltfilms.com
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,625
    Rep Power
    4247
    Er... shouldn't that be:

    Tag_Path *tp1 = new Tag_Path();

IMN logo majestic logo threadwatch logo seochat tools logo