problem with big programs

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mohsen

    problem with big programs

    Hello everybody,

    I have written a program and I have included 5 other programs (which I
    have borrowed 3 of them) in my program. Every time that I change the
    size of my arrays (pointers) I get different answers and sometimes no
    answer. I think I have a memory problem and I have tried to solve it
    many times but I couldn't. Does anybody have any idea how to solve
    such a kind of problem?
    I have also tested the program in UNIX and the results are different
    from Windows!
    I feel the program is so big and I cannot manage how take care of all
    of it.


    Thanks,
    Mohsen

  • sdavids

    #2
    Re: problem with big programs

    Perhaps your deconstructors are deleting information which you might
    need, or maybe you didn't program your copy constructor correctly. Try
    taking the deconstructors out temporarily and see if that fixes it, if
    it does you know where your problem is. Also, try stepping through your
    program and see exactly where it is going wrong.

    Comment

    • Tim Love

      #3
      Re: problem with big programs

      "Mohsen" <jafarikia@gmai l.comwrites:
      >Hello everybody,
      >Every time that I change the size of my arrays (pointers)
      Could you go into more detail about what the "(pointers) " bit means?

      Have you tried something like http://valgrind.org/ ?

      Comment

      • Howard

        #4
        Re: problem with big programs


        "Mohsen" <jafarikia@gmai l.comwrote in message
        news:1154446147 .654106.258410@ m73g2000cwd.goo glegroups.com.. .
        Hello everybody,
        >
        I have written a program and I have included 5 other programs (which I
        have borrowed 3 of them) in my program. Every time that I change the
        size of my arrays (pointers) I get different answers and sometimes no
        answer. I think I have a memory problem and I have tried to solve it
        many times but I couldn't. Does anybody have any idea how to solve
        such a kind of problem?
        I have also tested the program in UNIX and the results are different
        from Windows!
        I feel the program is so big and I cannot manage how take care of all
        of it.
        >
        Are we supposed to just guess? We have absolutely no idea what your code
        looks like, or what the problems you're seeing are. Please read the FAQ on
        how to post to this newsgroup:



        (By the way, a common method of debugging a program is to use a debugger.
        Try it.)

        -Howard





        Comment

        • Mohsen

          #5
          Re: problem with big programs

          I am simulating a population with different number of individuals, each
          individual has some genetic information. Those information are in
          pointers.
          I have not used like http://valgrind.org/ yet.
          Thanks,
          Mohsen

          Tim Love wrote:
          "Mohsen" <jafarikia@gmai l.comwrites:
          >
          Hello everybody,
          >
          Every time that I change the size of my arrays (pointers)
          Could you go into more detail about what the "(pointers) " bit means?
          >
          Have you tried something like http://valgrind.org/ ?

          Comment

          Working...