Pular para o conteúdo principal

Postagens

Mostrando postagens com o rótulo ptr

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<

C++, ponteiro, matriz, tabela, table, null, endl, ptr

#include using namespace std; int main() { system("color 1f"); int tabela[5] = { 17, 27, 37, 47, 167 }; int *ponteiro = tabela; cout << *ponteiro << endl; ponteiro++; cout << *ponteiro << endl; for (int i = 2; i < 5; i++){ ponteiro++; cout << *ponteiro << endl; } system("PAUSE > null"); return 0; }