Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void pagina2::CalcPR(nodo *pagina, int cant) {
- if (cant < 1) {
- return;
- }
- nodo *tempN;
- arista * tempA;
- double tempPR;
- tempPR = pagina->pr;
- tempN = pagina;
- nodo * temp2;
- temp2 = tempN->sig;
- while (tempN != 0) {
- while (temp2 != 0) {
- if (tempN->usado && tempN != temp2) {
- tempA = temp2->adyc;
- while (tempA != NULL) {
- if (tempA->nombre == tempN->nombre) {
- if (temp2->bl == 0)
- getNodo(tempA->nombre)->pr = 0;
- tempPR += getNodo(tempA->nombre)->pr / temp2->bl;
- }
- tempA = tempA->sig;
- }
- }
- else {
- if (tempN == temp2)
- temp2 = temp2->sig;
- if (!tempN->usado)
- tempN->sig;
- }
- temp2 = temp2->sig; //Here's where I get the error "Exception thrown: read access violation. temp2 was nullptr."
- }
- tempN->pr = (1 - d) + d * tempPR;
- tempN = tempN->sig;
- temp2 = pagina;
- }
- CalcPR(primeroN, cant--);
- return;
- }
- CalcPR(primeroN, cant--);
Add Comment
Please, Sign In to add comment