Questions tagged as 'c++'

1
answer

"no overloaded function takes 0 arguments" when trying to insert into std :: vector

bunny is the default class that has only bunny(construtor) and ~bunny(desconstrutor) default. int main() { vector<bunny> bunnies; // Este usa o construtor padrão. bunnies.push_back(); // ERRO! est...
asked by 02.06.2016 / 19:44
1
answer

Compiler reports typing error when there is no typing error

I have struct struct no { int numero[2]; std::string nome; float valorDoNome; struct no *esq, *dir; }; struct no *raiz, *aux1, *aux2,*favoritos; The function { raiz->valorDoNome=0; int posicao=1; for(unsigned i=...
asked by 23.06.2016 / 23:40
1
answer

Global C ++ variable [closed]

I have this code int main() { ListaVend lista; criarLista(&lista); for(int i = 0; i <= VEND_MAX; i++){ Vendedor vend; vend.codVend = i; vend.nome = "Vendedor "+to_string(i); vend.salFinal = i;...
asked by 21.09.2016 / 01:12
1
answer

Installing Qt in Visual Studio

I would like to know how to install the QT in visual studio 2015, I did everything, but I can not use it. Whenever I give a #include for example, it says that there is no file or directory. I've tried it in many ways. What is the best way to use...
asked by 14.03.2016 / 14:30
2
answers

How to pass variable normally by value by reference?

I want to pass the variable tabe (which is of type ifstream ) by reference to a function (I do not want a copy of it, just that the function to change it), well, I do not quite understand how it is done that. Code: #include <...
asked by 29.09.2015 / 01:34
1
answer

Is it correct to clean an internal malloc to a function with it?

Well given the following code is easy to do memory management: Sample Code (in C): #include <stdio.h> #include <stdlib.h> int *criarValor(void){ int *valor = malloc(sizeof *valor); *valor = 10; return valor; }...
asked by 30.05.2015 / 17:45
1
answer

Size of struct allocation

When I declare a normal variable of type int for example, the compiler goes there and, depending on the architecture, separates 4 bytes . struct exemplo{ int x; int b; }; int main(){ struct exemplo exemplo; } When I declare...
asked by 12.04.2015 / 04:36
3
answers

Undefined reference compiling with g ++

I usually use g ++ to compile my code, but now that I've started to learn template I can not compile for anything, the following error appears: g++ -c pilha.cpp pilha-infinita.cpp g++ pilha.o pilha-infinita.o -o pilha.exe pilha-inf...
asked by 26.03.2015 / 15:06
1
answer

Allocation of objects and pointers

How do I allocate a pointer, which points to a class, and that of an object? Is there a difference? Size, etc.     
asked by 05.04.2015 / 01:44
1
answer

Consume DLL C in VB6 or C #

I have a DLL (gbasmsb_library.dll) made available by Popular Pharmacy responsible for returning some functions to interact with this environment. Home I think it's a DLL written in C, I need to consume this DLL in VB6 or C # . In the progr...
asked by 12.02.2015 / 17:20