erros in debugging

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
void make_random_neighbourhood(POverlay po, size_t degree)
{
	size_t n = po->num_peers();
	for (size_t i = 0; i < n; i++) {
		size_t k = 0;
		while (k < degree){		
			size_t j = (size_t)floor(uniform (0, n, &gSeed));
			if (i != j) {
				k++;
				if (po->find_link (i, j) == NULL){
					po->add_link (i, j);
					po->add_link (j, i);
				}
			}
		}
	}	
}


the errors in debugging are:

No symbol "j" in current context.
No symbol "n" in current context.


but actually these two functions below are called and I found n=1000
when stepping into floor(uniform (0, n, &gSeed)), which means that
n has been assigned a correct value
1
2
size_t n = po->num_peers();
size_t j = (size_t)floor(uniform (0, n, &gSeed))

when step to the statement
po->add_link (i, j);
the fatal error arise:

No source available for "std::_Rb_tree_decrement() "

what is the reason?

thanks!
Are you asking why you don't have source for a C++ standard library internal function?

no, in fact, the program was successful before I modify other classes, which I believe has no association with these related function.
I don't know why in the debugging there are such errors as below:
1
2
No symbol "j" in current context.
No symbol "n" in current context.
My guess is that you're too deep in the call stack.
What level optimization level did you compile at? The compiler will frequently elide local variables, assigning them directly to CPU registers.
Topic archived. No new replies allowed.