0
I have a college protégé for a programming chair. One of the objectives is the evaluation of inserted projects (the insertion part I already have working), my problem is that when evaluated, I don’t know how but he eliminates the list. Below is my role to insert the reviews:
No * avaliarProjetos(No * head){
int projeto;
cout<<"Introduza o codigo do projeto\n";
cin >> projeto;
while (head != NULL)
{
if (head->codigo == projeto){
int avaliacao;
cout<<"Introduza a avaliacao do projeto \n";
cin >> avaliacao;
head->avaliacao = avaliacao;
}
head = head->prox;
}
return head;
}
Admit the following structure:
typedef struct dados {
int codigo;
string titulo;
string instituicao;
string investigador;
int meses;
string palavraschave[5];
float financiamento;
float subsidio;
int avaliacao;
float mediaAvaliacoes;
struct dados *prox; //Apontador para o próximo
}No;
I thank you in advance for your help.
Apparently there are no problems in the presented code. The problem must be in the call to the function. As you are calling this function?
– Vinícius Gobbo A. de Oliveira