Questions tagged as 'c++'

2
answers

Assign a value to the pointer and multiply (directly)

How do I multiply the pointer as soon as I assume a value to it? #include <stdlib.h> #include <stdio.h> int main (void) { int a,*b,*c,*d; printf ("\nInforme um valor: "); scanf ("%i",&a); b = &a; // Co...
asked by 29.06.2016 / 02:23
1
answer

How does Visual Studio Edit and Continue work?

Visual Studio allows you to edit the C #, VB.NET, or C ++ code in debug when you hit a breakpoint or click the break button (pause icon). The tool name is Edit and Continue . According to the documentation    is a productivity feature that a...
asked by 25.10.2017 / 17:11
1
answer

Overlay polymorphism is required?

In overlapping polymorphism is it mandatory that the method of a parent class that will be superimposed on a subclass is abstract? Is there an exception for some OOP language?     
asked by 04.01.2018 / 17:48
1
answer

What are the differences between Friend and Static classes / members?

What are the differences between classes and member variables friend and static within the definition of a class, including its applications. I know only that members of the static class belong to the class and not to the ob...
asked by 27.02.2016 / 22:20
1
answer

Cast of char vector for pointer

How does a cast work in a char vector for a int pointer? for example: char vetor[2]; int *p; p = (int *)&vetor; Can anyone explain this line to me?     
asked by 24.06.2015 / 03:25
1
answer

Doubt how to display binary tree by width?

Good to use this method of display needs a queue then all right, I tried this logic worked up to the third level of the tree . bool marcador = true; void buscaLargura(No *raiz) { if(raiz != NULL) { if (marcador == true)...
asked by 26.11.2015 / 16:31
3
answers

How to compare all the elements of two vectors one by one?

Having two vectors of int of the same size, there is some native language function that compares the x position of the first vector with the x position of the second vector, doing so to all positions generating a general r...
asked by 13.11.2016 / 21:21
2
answers

How to convert a std :: string into a QString?

I'm trying to make a simple display my name dialog box. See the code. Pessoa *p = new Pessoa("Ronald Araújo", "[email protected]", 23); QMessageBox msg; msg.setText(QString::fromUtf8(p->getNome())); msg.exec(); But the code bre...
asked by 18.06.2014 / 00:21
1
answer

Program does not execute anything when it comes into function

My program runs, but soon after asking for the value prob() and .exe to work. I thought it was some communication problem between functions because of the lattice[][4] array as an argument, but I've already tried, fixed,...
asked by 25.07.2015 / 00:26
2
answers

Pointers logic

In C ++, you can do the following: int variavel[10][10]; int** variavel; But when I want to create an array 2d, where can I have the first part "unlimited" and the second with limit? tipo ponteiro nova_variavel[limite] And the "reverse"...
asked by 08.02.2014 / 15:55