Questions tagged as 'ponteiro'

2
answers

Doubt char char C

Hello. I need to make a pointer char point to a memory location that holds a phrase, in C. I'm doing this: char *ptr; char array[3] = {'o','l','a'}; ptr = &array; But I do not understand what's wrong, I also do not know how to...
asked by 09.10.2017 / 22:55
1
answer

Call any function of another class of the same type

I need to pass as parameter to a member function another member function (but from another class). I can do this for functions of the same class, but of another I still can not #include <iostream> using namespace std; void MyP(int a)...
asked by 16.09.2017 / 14:42
1
answer

Number of elements allocated from a pointer

I need to know how many elements are allocated in my pointer pointer. For example with vector, sizeof(v)/sizeof(v[0]) in this way I get the number of elements that vector has. I would like to do the same, but with pointers. #include <...
asked by 16.04.2017 / 01:40
2
answers

Chained List C does not insert new node

I started to do a linked list program, but when I use the print function, it was not printing anything, so I discovered that LISTA after exiting the function inserts it, it returns the value NULL and I I do not know why. #inc...
asked by 28.02.2017 / 14:48
1
answer

how to solve "SIGSEGV" error when using 'strcpy'

Hello, I'm experiencing a "SIGSEGV" error on the following line: strcpy(buffer_ReceiveAutomation, ls_buffer_PPouAUT);
asked by 22.07.2016 / 19:07
1
answer

request for member 'attributeDisplay' in something not a structure or union

Tree initialization error, the problem with category variables and atributoOuDecisao . typedef struct node { int categoria; int atributoOuDecisao; struct node *prox; struct node *lista; } No; No *criaArvore(void){ No...
asked by 16.10.2016 / 20:12
1
answer

Can anyone help me with Pointers on this code?

Galera, after implementing the delete my code function no longer works, could someone help me? , without the Delete function is working, what is wrong with it? //biblioteca #include<stdlib.h> #include<stdio.h> // Constantes #de...
asked by 13.04.2016 / 02:39
2
answers

Code :: Blocks does not print the pointer value

I developed a code in C to print the value and address of the variable x using a p pointer, but Code :: Blocks does not print the values. #include <stdio.h> #include <conio.h> int main() { int x=2; int *p;...
asked by 19.08.2018 / 17:57
1
answer

Decrement, increment and sum of pointers in C

When I try to add the last pointer over 15, it repeats the third-to-last pointer and does not add the pointer *ptr_xi to it with a further 15? int xi; int *ptr_xi; void imprimir() printf("valor de xi = %d \n", xi); printf("v...
asked by 14.07.2018 / 04:52
1
answer

How to edit data in a Struct using a function

I want to create an edit function that receives as a parameter by reference the vector of songs. (using pointers) The user must choose the number of the song and re-enter the data of that position of the vector. I created the struct, I'm a...
asked by 08.07.2018 / 11:14