problem with big programs

M

Mohsen

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
 
S

sdavids

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.
 
H

Howard

Mohsen said:
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:

http://www.parashift.com/c++-faq-lite/

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

-Howard
 
M

Mohsen

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,196
Latest member
ScottChare

Latest Threads

Top