Questions tagged as 'c++'

1
answer

How does the frame-pointer work?

In the official GCC documentation there is a option that allows you to remove the frame-pointer when not needed. What does the frame-pointer do? How to remove this pointer can improve performance?
asked by 16.02.2017 / 11:49
2
answers

Overloading C ++ operators, is the auxiliary variable necessary in this case?

I'm studying through the book Introduction to Object Oriented Programming with C ++ (Antonio Mendes da Silva Filho), and I implemented an example of it as follows: #include <iostream> using namespace std; class Contador{ public:...
asked by 03.01.2017 / 16:17
2
answers

Parameters for external call

I use Linux and by default (or at least in my case) it does not have screen brightness control, however it has a program that can control it. The question here is that I want to get the value of the "user" and use this value in a function typ...
asked by 19.11.2016 / 03:57
1
answer

Problem to assign more than one value to variable

#include <stdio.h> int main(){ int d; int e; int peca1; printf("digite um lado da peca: "); scanf("%i", &d); printf("digite outro lado da peca: "); scanf("%i", &e); peca1 = d , e printf("%i, %i", peca1); return 0; } I w...
asked by 12.05.2016 / 20:24
1
answer

"error: 'string' does not name a type" when declaring strings

Follow the code class Nome { public: Nome(string nome, string sobreNome); void exibirNome(); virtual ~Nome(); protected: private: string nome; string sobreNome; }; Error    error: ex...
asked by 27.03.2016 / 13:54
1
answer

too many arguments to function 'address * find ()'

I'm trying to compile this code in DevC ++ but still giving this error    [Error] too many arguments to function 'address * find ()' #include <stdio.h> #include <stdlib.h> #include <string.h> struct endereco { char...
asked by 17.11.2016 / 19:19
2
answers

How to show the largest number entered using functions?

#include <iostream> using namespace std; void maior(int a, int b); int main() { int cont, maior1; do { cout << "digite um valor: "; cin >> cont; maior(maior1,cont); }while (cont != -1);...
asked by 01.11.2015 / 15:10
2
answers

Error creating child - Scheduling processes using fork

Write a C / C ++ program called novela.cpp that does the following: The Parent process creates a Son1 process in 10 seconds and a Son2 process in 20 seconds and then runs indefinitely. Well, I developed the code, he creates the father, he...
asked by 22.06.2017 / 01:51
1
answer

Sequential Static List

Galera look at this code: lista is struct lista * crialista() { lista *li; li = (lista *) malloc(sizeof(struct lista)); if(li !=NULL) { li->qtd = 0 ; } } Why was lista allocated to...
asked by 07.07.2015 / 15:44
3
answers

How to run a C program in Visual Studio Code

I'm trying to run a code (program) in C in Visual Studio Code, but I can not find the necessary settings. I installed the C / C ++ (Microsoft) extension Project structure: .vscode          - c_cpp_properties.json          - tasks....
asked by 25.10.2016 / 14:47