Questions tagged as 'ponteiro'

1
answer

Use "-" or "." in a linked list?

Good afternoon, doing a hash table without collisions, I created the struct list, however when compiling the code it does not accept that I use the -> prox from my struct, it asks me to use .prox. But if prox is a pointer I should not use struct...
asked by 11.07.2018 / 20:42
1
answer

Check if the number entered is already present in struc

Good afternoon, I'm facing the following problem. I need to make an algorithm for registering 15 people with the following information: account number, name and balance. However it is necessary to check if the account number has already been ent...
asked by 30.07.2018 / 17:30
1
answer

Delete a record in struct using free ()

I am creating a registry using struct , where I should have a menu to include, display and answer (exclude) patients. The problem is in the delete function that because of my lack of knowledge I do not understand what the correct way to...
asked by 17.06.2018 / 02:41
1
answer

How to check if the list is empty or with an element in C

typedef struct { int tamanho; nodo *inicio; } lista; typedef struct { lista **vet; int tamTabHash; int colisoes; } tabHash; tabHash *criaTabelaHash(int tamanho){ if(tamanho < 1) return NULL; tabHash* hash = (tabH...
asked by 04.07.2018 / 03:13
1
answer

Insertion at the end of a chained list C

I'd like to know how to go through the list so that I can add a new one at the end of it, in the case at the position in the-> prox of the last one in this list. Here is my code: typedef struct lista { struct no *prim; } Lista; typedef str...
asked by 05.06.2018 / 08:09
1
answer

Pointer return that points to a local character vector?

#include <stdio.h> char *local(void); void main(void) { char *ponteiro = local(); printf("%s\n", ponteiro); /*Saida = - (*/ } char *local(void) { char nome[12] = "programador"; char *ponteiro = nome; return ponteiro;...
asked by 09.05.2018 / 05:29
1
answer

Pointer and Memory Allocation

I know which pointer stores memory address. And a variable stores a value. But taking into account that I have a class class player {} and I create a variable player p; and a pointer instance player *np = null; What's the di...
asked by 09.04.2018 / 03:50
1
answer

Dynamic array as a parameter in C or C ++?

After hours of research, I did not find anything that answered my question, or I could not understand the answer. I want to create a NxN array of variable size. I did with pointers , but I want to pass it as a parameter between functions, a fu...
asked by 25.03.2018 / 06:51
1
answer

C pointers handled in python

#include <stdio.h> #include <stdlib.h> #include <locale.h> int main() { setlocale(LC_ALL,""); int *x,valor,y; valor = 35; x = &valor; y = *x; printf("o endereço da variavel valor: %p\n", &valor...
asked by 09.01.2018 / 19:04
1
answer

I have a question about inherited default constructors

I'm in doubt as I try to improve an OOP exercise here .. (-) = no I have the PAI class with two constructors (one is default). In the SON class I have two more constructors (no-default). In the definition of one of these constructors there...
asked by 23.12.2017 / 13:49