P
pauldepstein
I have probably "bitten off more than I can chew". But, I'm new to c++
and am trying to debug a program consisting of 9 files and about 2000
lines of code.
My program compiles but I get a runtime error: "Access violation:
segmentation fault raised in your program" -- dev c++ compiler.
Here is the most specific indicator of what is going wrong: There
follows a small sample of code.
The functions set_equity and set_probability are fairly complex
recursive functions.
Can anyone speculate as to where the problem might lie? Does this
sound like a problem with a destructor?
Of course, I could provide more code but the full program is too long
to be appropriate so I don't know what else to include.
node_array = new node* [node_number];
for (int k = 0; k < node_number; k++)
{ cout << endl << node_number << node_number << node_number;
cout << endl << k << k << k << k;
debug << endl << "index " << k;
node_array[k] =
new node
(params, x_coord(params, k), y_coord(params, k),
rights_coord(params, k));
node_array[k]-> set_equity();
node_array[k]-> set_probability();
// more code
Thank you,
Paul Epstein
and am trying to debug a program consisting of 9 files and about 2000
lines of code.
My program compiles but I get a runtime error: "Access violation:
segmentation fault raised in your program" -- dev c++ compiler.
Here is the most specific indicator of what is going wrong: There
follows a small sample of code.
want) but that k is only displayed for its first two values of 0 and 1.From the screen displays, I see that node_number is at 10 (the value I
The functions set_equity and set_probability are fairly complex
recursive functions.
Can anyone speculate as to where the problem might lie? Does this
sound like a problem with a destructor?
Of course, I could provide more code but the full program is too long
to be appropriate so I don't know what else to include.
node_array = new node* [node_number];
for (int k = 0; k < node_number; k++)
{ cout << endl << node_number << node_number << node_number;
cout << endl << k << k << k << k;
debug << endl << "index " << k;
node_array[k] =
new node
(params, x_coord(params, k), y_coord(params, k),
rights_coord(params, k));
node_array[k]-> set_equity();
node_array[k]-> set_probability();
// more code
Thank you,
Paul Epstein