Questions tagged as 'c++'

1
answer

c ++ problem: selection sort

Hi, I wanted help solving a problem with c++ : I am making a code and I used the selection sort but it has a bug in the results output void select_sort (int vetor [TAM]) { int menor,aux; cout << "Digite as 5 posicoes, d...
asked by 24.06.2017 / 18:00
2
answers

Problem compiling singleton c ++

When trying to compile a singleton I always get the following return message:    g ++ -g -Wall pkg-config --cflags stage -fPIC pkg-config --libs stage -c -Wall Connection.cpp   cc Connection.o -o Connection   /usr/lib/gcc...
asked by 10.09.2017 / 00:48
1
answer

Can I give new in one class inside one constructor of another?

I have two classes: Path and Path. When I go to give new in Path in the constructor in Path the program does not compila.Can anyone help me? Path Constructor: Trajetoi(string Origem, string Destino, int passageiros) { this->passagei...
asked by 14.06.2017 / 01:09
2
answers

Vector of objects in C ++

How do I make an object vector using c ++? And how do I sort this array of objects, for example, using some sort algorithm (quicksort, mergesort, shellsort, or radixsort)? #include <iostream> using namespace std; class Game { public:...
asked by 07.06.2017 / 01:05
1
answer

Use methods of a project written in C ++ in C # (In the same Solution)

Hello, I need to use methods written in C ++ in a project written in C #, inside .NET (both) and that are contained in the same solution (as shown in the image below) ItriedtocompiletheprojectsandaddtheC++projectreference(whichwascreatedi...
asked by 29.05.2017 / 04:00
2
answers

C / C ++ library for manipulating images

I would like to know which library to use, which is easy to install for both Windows and Linux, to manipulate images (of type png, jpg, etc) in C / C ++? I would like to open and save it in an array to be able to work with this data as well a...
asked by 07.07.2017 / 20:48
2
answers

I connect in the database but the values do not change when I give UPDATE MYSQL Qt C ++

The data is loaded into the table, so I change the data in the table, when I click the button to update, I get the data (even the changes) and save it to the variable, but it seems that when I enter the sql query nothing happens . I need to be ab...
asked by 08.06.2017 / 12:51
1
answer

What's wrong with this code? [closed]

Why is this code not being compiled? #include <iostream> using namesapace std; int main(){ long long xm; long long ym; long long xp; long long yp; cin>>xm; cin>>ym; cin>>xp; cin>>yp; long long t; t=(xp+yp)-(xm+ym)...
asked by 22.05.2017 / 00:00
1
answer

Do While C ++ does not enter the loop using getline in string

Good afternoon people, I have a problem with my code. When I ask if the user wants to repeat the program, it simply does not loop. I have already tried using the user as numeric information and it worked, but I need it to be in the form of Strin...
asked by 02.05.2017 / 22:47
1
answer

make an include of a library outside the libraries folder

How do I include a library that is not in my library folder in C ++? I know that the directive of #include with <> can make the include of the file that is not in the same folder, but if I have several folders with a libra...
asked by 11.05.2017 / 01:48