Questions tagged as 'c++'

3
answers

Pass a dynamic fix by function in C ++

Can you help me with the following exercise? The idea is to have 3 functions with 3 vectors, vector 1 enters even numbers, vector 2 enters odd numbers and vector 3 multiplies each value of vector 1 with vector 2. In the end, the 3 vectors are...
asked by 12.11.2018 / 06:00
2
answers

Problems printing in the arcihvo.txt

Help My program only creates the empty file.txt, could you help me to make the data that you enter in it be saved in the file. void agregar(){ system("cls"); system ("color 3e"); fflush(stdin); printf("\n%d.Nombre de contacto:...
asked by 09.11.2018 / 01:22
1
answer

OpenGL help glutMouseFun () function

I would like someone to help me or give me an explanation regarding a problem presented with the glutMouseFunc () function, I have created a class called Button class Button{ private: char *texto; int iniX; int iniY; int tam...
asked by 01.12.2018 / 23:07
1
answer

Restrictions on the getline C ++

The program consists of collecting the names of people, (only their names, not last names) showing them by screen, until finding a string that is 'END'. Program format: (first name, last name) Example: Manuel, Perez Pepe, Geneva Lola,...
asked by 27.10.2018 / 20:55
1
answer

Two-dimensional array with leading elements c ++

Hi, I have to make an array of this type arr [32] [64] where each element is a pointer. I need to make a 32x64 matrix. Each element of that matrix is a pointer to a linked list. I do not know how to declare it.     
asked by 27.10.2018 / 17:12
1
answer

Problem when using a singleton with an abstract factory

I only put the title of the pattern that I am using, but that is not a problem (maybe it seems to me to be a header problem) I also try to detail everything in my code with its respective compilation error. If someone has any idea to solve it, I...
asked by 01.11.2018 / 01:00
1
answer

Challenge to carry a number to 0

The number of minimum steps must be determined for an integer N to reach 0, following these rules: 1) If N is the product of two numbers a and b, other than 1, then replace N with the max (a, b) 2) Otherwise, replace N with N-1 Example: The n...
asked by 24.10.2018 / 01:11
1
answer

Print Matrix

When I print this matrix, it should go vertical, as the 1s come out, but I get everything in a straight line. But if after cout << char(254); I put a endl I get spaces between each character and not together. if (x == 1) {...
asked by 08.11.2018 / 01:12
1
answer

Pass queue by reference to function

I want to pass by reference a Queue of type string that I created to save names, to display them by screen these must be passed by reference since I do not want to have everything in the main and this object in the future it...
asked by 05.10.2018 / 01:55
2
answers

Help with matrices

I am starting to use matrices and I made an exercise to make a 3X3 table, that the user fills them and then shows the table but when he executed the program he shows me in a part numbers he does not enter. If you find the error, explain to me th...
asked by 19.09.2018 / 20:33