Thread: Problems (just a complaint thread)

  1. #1
    Just because ygfperson's Avatar
    Join Date
    Jan 2002

    Problems (just a complaint thread)

    So I've been putting together my Expression manipulator. I get everything working. Combining like terms works. Division works. Numbers automatically combine. I have a reasonably good idea on where memory is managed, and I'm fairly trusting that its being deleted and new'ed with care.

    And then I write my 'combine_like_factors' part, for when you have two factors with the same base, and different (or similar) exponents. My trust in my memory management has gone out the window. I try to print out a string, but I'm getting the linux enviroment variables instead...

    I've re-created the same function 4 times, but each time the same thing happens, and it unwinds somewhere down the road. I think my factors are becoming detached (they're in pointer form)... And it could be code that I wrote a while ago and trusted to work, except that trust is all well and good until you actually run the code...

    Just ranting. Any of you ever encountered a similar situation?

  2. #2
    Just because ygfperson's Avatar
    Join Date
    Jan 2002

    g = (Factor*)g;
    All because of this!!!!

    Technically, half because of this. There's still another, more detectable error... grrr...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Thread Synchronization in Win32
    By passionate_guy in forum C Programming
    Replies: 0
    Last Post: 02-06-2006, 05:34 AM
  2. multithreading question
    By ichijoji in forum C++ Programming
    Replies: 7
    Last Post: 04-12-2005, 10:59 PM
  3. Win32 Thread Object Model Revisted
    By Codeplug in forum Windows Programming
    Replies: 5
    Last Post: 12-15-2004, 08:50 AM
  4. Replies: 12
    Last Post: 05-17-2003, 05:58 AM
  5. Multi-Thread Programming
    By drdroid in forum C++ Programming
    Replies: 6
    Last Post: 04-04-2002, 02:53 PM