Questions tagged as 'punteros'

1
answer

How can I update a listT automatically?

That is to say that if I change an element of the list (of the STL list) outside of it, this change is reflected in the list (or lists that have the element inserted) without having to go through it and make the change " manually ". Could this b...
asked by 21.08.2018 / 02:26
2
answers

Problem with a pointer to struct type

My problem is this: I want to implement a TAD that allows me to go through a data collection of type string , entering values at the end and in the header .h I have the declaration: typedef rep_string *coleccion; In the .cpp file my...
asked by 30.05.2018 / 19:23
1
answer

Array of C pointers [duplicated]

a question I have a doubt if someone can help me. What would be the prototype of a function that receives as parameter an array of pointers? Thank you very much     
asked by 21.04.2018 / 22:44
1
answer

I want to know why it does not print the complete array with my dynamic pointer in c ++

When I run the program, it does not print the last line on the screen. For example, if I tell you to make room for 3 string then just ask me two times and print only 2 the first two strings that I type. I want to know why this happens...
asked by 08.03.2017 / 17:22
1
answer

How to use the "pointer formalism" to calculate the average of a table?

I have an exercise in C ++ / C to make the average of an array using the "pointer formalism" ("formalisme pointeur" in French). For example, this next one uses the "pointer formalism" to manipulate the table: int tab[10]; for{int i = 0 ; i &l...
asked by 10.02.2017 / 18:14
0
answers

What's wrong with this program?

I'm working on a program with trees, it's the first one I do and when I compile it I throw segmantation fault and I do not know what is wrong. struct Nodo { int Dato; struct nodo *izq, *der; }; typedef struct Nodo nodoArbol; typedef n...
asked by 26.10.2018 / 01:56
1
answer

Sort list pointers doubly linked

There is the following structure: typedef struct nodo{ int matricula, edad; char nombre[20]; float peso, altura; struct nodo *next, *prev; } List; List *first, *buffer, *buffer2; And to sort it, according to the member, ther...
asked by 01.05.2018 / 02:12
0
answers

Problem with C pointers

My problem is this: I have the following code char v = 65; char k = 65; char* un = calloc(2, sizeof(char)); for (int i = 0; (25*i < dot) && (i <= 25); i++){ un[0] = v; for (j = 0; (j <= 25) && ((j + (25*i)) &l...
asked by 12.04.2018 / 20:01
0
answers

expected type-specifier before error c ++

I get an error compiling that I do not understand, I'm implementing the Langton ant using inheritance and polymorphism, by creating a pointer to a class that defines a type of ant with special characteristics. Estos son los errores que me sale...
asked by 11.03.2018 / 21:33
0
answers

Referenced objects and pointers of a class

I have a program that has to create a tree from a graph, for that I have the following code: NodoArbol<Vertice>* GrafoMatriz::getBP(bool AR, string origen){ int num_pf=1; int indiceV = this->getIndicePorNombre(origen); Nodo&l...
asked by 10.11.2017 / 05:05