Questions tagged as 'ponteiro'

1
answer

Pointer function for pointer

I have the following function NOTE: In this function is only the first case, not to get too large. Since the error occurs at the first insertion. int insertAVL_TreeR(struct AVL_TreeNode **node, void *elem, int *h) { if (!node) {//...
asked by 25.02.2016 / 02:25
1
answer

Help with pointers

Can anyone help me with this code? it is not working, I can not find the error. #include <stdio.h> int chamar(int *n){ printf("Digite o valor de n:"); scanf("%d",&n); printf("%d",n); return 0;...
asked by 13.04.2016 / 04:31
1
answer

Is it possible to rewrite any code that uses pointers (C #) without using pointers in Node.js?

Is it possible to rewrite any C / C # code that uses pointers in a way that does the same thing without using them? My fear is more complex codes. The simple ones I believe do not have difficulties to rewrite. How could I replace pointers...
asked by 27.10.2018 / 08:46
1
answer

passing by struct reference does not work (dynamic queue C)

I'm trying to implement a Dynamic Queue. When I initialize the program (start and end = NULL), and then put to queue a value (function queue) the "end" pointer receives the new queue item, however the "start" does not, whereas in the function I...
asked by 13.11.2018 / 04:01
1
answer

Pointers in C language

I created a simple code with the function void where there is a passage by reference. However, it is giving the following error at compile time:    lala.c: In function 'main':       lala.c: 19: 12: warning: passing argument 2 of 'test...
asked by 24.10.2018 / 04:16
2
answers

Error with Near and Far pointers in C code

Error compiling C code with Near and Far pointers #include <stdio.h> void main(void) { char *titulo_near = "Bíblia do Programador C/C++, do Jamsa!"; char far *titulo_far = "Bíblia do Programador C/C++, do Jamsa!"; printf("...
asked by 22.09.2017 / 11:19
3
answers

I need to make a function that passed an array n * m, be transformed into a one-dimensional vector of n * m

int* Vetor_Unidim(int **matriz, int n, int m){ int *vetor = (int*)malloc((n*m)*sizeof(int)); int *p; p = *matriz; int tam = n*m; int i; for(i = 0; i<n; i++){ p = matriz[i]; for(j= 0; j<m ; j++, p++){...
asked by 08.07.2018 / 23:34
1
answer

Loop End Error (Bug delete with char *)

1 - I have this code (I gave a summary, type -1, and then 'n' to exit the loop and the error occurred): #include <iostream> #include <cstdlib> #include <cstdio> #undef max using namespace std; int* cont = new int(0); //----...
asked by 13.12.2014 / 23:28
1
answer

Improve the performance of a method with pointers

Here's the code working: string string_pick(string text, string tag, char caractere) { int index = text.IndexOf(tag); return text.Substring(index + tag.Length, text.IndexOf(caractere, index + tag.Length + 1) - (index + tag.Length)); }...
asked by 17.06.2016 / 01:20
1
answer

Vectors, pointers, and storage in memory [closed]

I need to solve an exercise where I need to use pointers, vectors and memory storage:    Create a vector with n elements, where each vector position   will match a pointer to a value of type float . Do it   read n values and store them...
asked by 21.12.2015 / 16:24