First, I want to compliment the forum members for their patience and helpful answers. I always fill that I'm not doing that enough.
Now, to my question.
In my program, I have a myVec class (which I think I already mentioned in this forum). Usually, there is no problem with this class, however there is one point in the program that stop once I create such a class member, the line is simply,
myVec r;
I tried to debug the line and the constructor and the only weird part I read is that the line
length = LENGTH
where I used
#define LENGTH 3
does not show that the value of length has changed in the debugger (I tried to print the value of length but no message is printed).
I can't post the code up until tomorrow but I don't think it would be any help. The myVec constructor is something of the sort:
1 2 3 4
length = LENGTH
coor = newdouble[length]
for (int i = 0; i<length; i++){
coor[1] = 0;
I want to mention again that the constructor does work on most of the code but on a specific part of the code it doesn't work. I am sure that the problem is not with the constructor and I can't think where the problem might be and this is what I'm asking for, what might cause a constructor to work perfectly well in one part but kill the program in another part?
As for the const usage, I have a single header file where I place all the constant of the program, including the LENGTH (includer.h). I just explained what LENGTH is.
This loop cause me the problem. Note that I don't call the ball2 function in any stage (at least I dont think I do and I'm only coping the memory address from place to place. On my machine (mac mini, eclpise IDE) the line myVec r cause the machine to get stuck in the loop (I think) and I see the program doesn't finnish running. If I replace myVec r with myVec * r, the program acts normal (atlist I think so).
I have used the coor[0] only because it is easier to see (for me). As for now I know that I should used coor = newdouble [3] but I want the code to be changeable easily.
thank you everyone for such answers....after reading the posts got many ideas about executing the codes...u can even make the codes shorter...try it...
__________________________________________________________________
Want to get-on Google's first page and loads of traffic to your website? Hire a SEO Specialist from Ocean Groups [url=http://oceangroups.org/]seo pecialist [/url]