Pular para o conteúdo principal

Postagens

Mostrando postagens com o rótulo alocação dinâmica

C++, alocação dinâmica, ponteiro, ptr

#include #include using namespace std; struct listaDE {  int info;  struct listaDE* ant;  struct listaDE* prox; }; //Protótipos listaDE *insere(listaDE *LISTA, int valor); listaDE *insereFim(listaDE *LISTA, int valor); void exibeIpF(listaDE *LISTA); void exibeFpI(listaDE *LISTA); listaDE *remove(listaDE *LISTA, int valor); listaDE *busca (listaDE *LISTA, int valor); int contaNos(listaDE *LISTA); void libera(listaDE *LISTA); int main() {  int op, valor;     struct listaDE *lista= NULL; //inicializa a lista duplamente encadeada    do   {         system("cls");     system("color 3f");     cout<<"\n\n( () ) Alocacao Dinamica ( () )";     cout<<"\n(                             )";     cout<<"\n( 1- Insere no Inicio         )";     cout<<"\n( 2- Insere no Fim            )";                                     cout<<"\n( 3- Remove da Lista DE       )";     cout<