Questions tagged as 'ponteiro'

1
answer

Warnings when compiling the program

In the code below, I need to create a structure for Point (Coordinate x and y) and create a function that creates those points using pointers. The structure was made as follows: typedef struct //Estrutura definida para os pontos. { double...
asked by 30.05.2017 / 18:40
1
answer

What is the purpose of incrementing a pointer?

Given: #include <stdio.h> int main () { int x = 1; x++; int *y = &x; y = y + 1; printf("%d\n",x ); } The output is 2. In this case, I would like to know if the following interpretation is correct: y = y...
asked by 25.10.2016 / 00:36
1
answer

Manipulating listint in c ++

My Class class Grafo{ int numeroVertice; list<int> *arestas; public: Grafo(int vertices); int addVertice(int quantidade); void addAresta(int verticeOrigem, int verticeDestino); void remAresta(int verticeOrigem, int verticeDestino); void...
asked by 23.09.2016 / 21:26
1
answer

Function int (* cmp) (void *, void *)

I know that it compares pointers and returns an integer that determines whether one is smaller than another, in the order sense. But when I use it in main() , it is giving some error. Can you help me?     
asked by 29.06.2016 / 16:04
1
answer

SIGSEGV error in using a pointer

I have the following problem: I'm creating a pointer and allocating memory in it, passing its reference to function, but when I read it in function the error occurs in the title. Function: void FileLer(char *texto, char *file) { //...
asked by 22.08.2016 / 15:48
1
answer

'System.NullReferenceException' in C

Running the following code it displays the error System.NullReferenceException in the call of the function SubString #include <stdio.h> #include <stdlib.h> #include <string.h> // // Implementado o met...
asked by 28.07.2016 / 16:18
3
answers

C pointers, error invoking the reallocation function

I have the C code written below, whenever I want to invoke the function of an error that says: - / home / samuel-o-face / Documents / Data Structures and Algorithm / Class 13.04.16 AllocatingMemory / main.c | 80 | error: conflicting types for 'a...
asked by 17.04.2016 / 08:12
1
answer

Error writing binary file using fwrite

Why this code snippet DataRootDir data = rootdir[i]; fwrite (data, sizeof(DataRootDir), 1, arq); always returns error error: cannot convert 'DataRootDir' to 'const void*' for argument '1' to 'size_t fwrite(const void*, size_t, size_t, FIL...
asked by 19.02.2016 / 19:53
1
answer

Is it possible to pass string from the string class as a pointer to function?

Is it possible to pass string from string class as pointer to function? example: void separaStr(string *modulo, satring *nmodulo, *digito){}     
asked by 25.09.2015 / 21:06
1
answer

Printing problem with C

Good morning. I have a problem solving a question of an issue here in college. Here's the question. Theteachergavethesourcecode(following)#include<stdio.h>#include<stdlib.h>#include<locale.h>#definedimencao10typedefstructce...
asked by 31.08.2015 / 16:24