Questions tagged as 'ponteiro'

1
answer

C ++ / Arduino Array in class

I have a problem in using an array of pointers, I need to create an array with pointers that refer to an integer value of each object of another class. Example: arrayDePonteiros[0] = objeto.int; In case this array is inside a class and a...
asked by 16.08.2014 / 22:51
1
answer

Definition and function of QSharedPointer

As far as I can understand, QSharedPointer is a smart pointer, that is, a pointer that offers automatic garbage collection. If possible I would like a code that would best explain this, including when to use it.     
asked by 09.06.2014 / 19:44
1
answer

Typing a pointer to struct

I was suggested to build a linked list using the following struct as a node: typedef struct node *link; struct node{ int item; link next; }; As I did not understand what the pointer operator along with this typedef I...
asked by 03.10.2015 / 16:14
1
answer

Incompatible Arguments - Pointers to Structures

Good afternoon, I needed help fixing errors in the terminal. Summary: I performed some functions to get certain information (values) on active customers (where a customer is active if he or she is an issuer or beneficiary of an unproc...
asked by 14.05.2015 / 13:02
1
answer

Is there any problem with pointers in this struct that works with linked lists?

Hello. I'm developing a game with the C ++ language and I think I'm making a mistake in using threaded lists. I emphasize that I know there are more interesting features than using linked lists in C ++, but this is a project I did for college...
asked by 13.12.2015 / 15:03
2
answers

What is the error in this Code: [closed]

I am trying to compile this code, use the C head but this is returning me errors #include <stdio.h> void go_south_east(int* lat, int* lon) { *lat = *lat -1; *lon = *lon - 1; } int main() { i...
asked by 07.11.2014 / 12:27
2
answers

Pointers and arrays picking up something not expected

#include <stdio.h> int main() { int vetor[][3] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; int valor= *(vetor[1] + 1) + **(vetor + 3); printf("%d", valor); } The code above was taken from theoretical exercises, but I do not h...
asked by 25.09.2018 / 19:32
2
answers

How to modify the contents of a root using a pointer?

How to modify the contents of a root using a pointer?    Type a code in C that uses a variable named 'root', has the type 'float' and has the initial value number 3.1415.       In this same code, use another variable named 'point_to_race' to...
asked by 20.08.2018 / 20:58
2
answers

Why can I pass a vector of char to the scanf as an address or a direct variable?

If the vector name or array is already the address of the first element, why in scanf() , using the primitive types ( int , char , float , double ) I need to pass the address, and when we want to read a string (...
asked by 02.11.2017 / 15:46
1
answer

How do I pass the address of the first char of a string to a function write to it?

The problem is this: I made a function that takes the output of a certain command from the OS and stores it in a string. The idea would now be to declare a string of just one char in my main function using malloc , call my function by pass...
asked by 21.06.2018 / 01:24