Questions tagged as 'punteros'

1
answer

failure to assign values to variables with pointers

Problem with pointers I assign value to the first variable using a pointer, then reuse the same pointer and assign a value to the next variable but I do not understand why the last one prints a value that has nothing to do with the code (== 3...
asked by 29.09.2018 / 03:52
1
answer

Problems with copying an array into another dynamic array

I have a problem with the execution of this program. I do not know why it ends up running so abruptly ("The program stopped working"). The results of it are what I hope, however that happens. And I tried many things to avoid it and found that wh...
asked by 17.04.2018 / 16:09
1
answer

The pointer does not return the full value of the string

Hello, I have problems with this code that must convert an integer to binary and keep the zeros and ones in a pointer of type char. However after the execution the pointer only returns a 1 and not all the values of the string #include <stdi...
asked by 11.11.2017 / 19:37
1
answer

Use type declared later in a structure

I have these structures typedef struct stDC { qint8 numberA; qint16 numberB; qint32 numberC; qint64 numberD; qint32 *intList; qint8 *byteList; stDC *list; int listlen; QString string; int mode; float...
asked by 23.12.2017 / 02:49
3
answers

Add the elements of two linked lists in a third list

The idea is to represent a three-digit sum 6 8 9 <---- valores de lista 1. 5 7 4 <----- valores lista 2. ------------- 1 2 6 3 <------ valores lista 3. So far I get the result of the sum, but taking the values fr...
asked by 14.12.2016 / 22:21
1
answer

Failure to save data in a Dynamic Structure

I want to create a structure that grows in size when registering a new data. It saves me the first three data well without any problem, when entering a fourth data the first data is deleted until entering a seventh data the second one is delete...
asked by 15.11.2018 / 22:13
0
answers

Print list of names in C

The truth is I'm a bit lost on this from the pointers and I need help with a program I'm supposed to enter n for the number of names the list will have, enter the names one by one and at the end it should show me in the form of a list the...
asked by 14.11.2018 / 05:53
0
answers

Problem in sum overloaded with array pointers [closed]

I have an overloaded operator + that returns an object of type IntArr, the sum of arrays is done well inside the function but when I do A = B + C the first two elements are not copied, leaving any numbers, why Does this happen? Thanks Over...
asked by 21.04.2018 / 17:01
0
answers

How can I modify data a record with pointers in C? [closed]

In my program I have a struct students record where I input data from 3 students, ( name, age, phone ), into the program main ( main ) asks what you want to do, when selecting the option "modify", I need to modify some value entered, but in...
asked by 09.02.2018 / 21:47
2
answers

Some func / class to create class instances by a char * or string in C ++

It is possible to create a instance of a class by searching for char * or string in c ++ 11 strong>: ex: class MyClass:basic_class{}; basic_class* m = (basic_class*)new(typer("MyClass")); I do not know if it's "typer" something li...
asked by 25.05.2017 / 13:33