Questions tagged as 'c++'

3
answers

Problem when Printing Data from a C ++ Matrix

Good afternoon, I have the following exercise in which I ask for Name, Cedula, and also the amount of liners produced daily, but we must also take into account that it must be done per week (assuming that the month has 4 weeks). The program...
asked by 26.04.2017 / 21:12
2
answers

When is a pointer needed in a return of an operator function?

I am studying for a term and I want to know when we use the return of the operator functions. For example, why is the pointer needed in return !((*this)==v); ? class vecteur3d { float x; public : vecteur3d(floatx=0.0)...
asked by 10.05.2017 / 14:27
2
answers

can not convert 'int *' to 'Trade *' for argument '1' to 'void request data (Trade *)

Why is this error? #include <iostream> #include <stdio.h> #include <string> #include <stdlib.h> #include <stdio.h> #include <ctype.h> #include <iostream> #include <string.h> using namespace std;...
asked by 30.10.2018 / 21:23
2
answers

Name a variable by a user in c ++

Good morning; Only one question that I have been asking for a long time. In a c ++ program we can declare a variable with a name in a very simple way, for example: int operando_one; However, my question is whether you can give that name...
asked by 10.06.2017 / 07:40
1
answer

error in switch case [error] jump to case label [-fpermisive]

I am implementing this code which is to project the vowels using a matrix and to identify if a word or phrase is palindrome. Everything was fine until I made a mistake in the exit option #include <iostream> #include <stdlib.h> #...
asked by 26.08.2017 / 16:37
2
answers

Problem when printing variables in structure

In case 2 I try to print the variables, but it shows me wrong values I tried to do it in a function and the same thing happened, with pointers and neither did the program in the enter function does everything right try to print from it and It sh...
asked by 25.10.2018 / 22:53
1
answer

I do not jump the error when I enter a negative error

if ((_base||_altura) <= 0){ throw string {"ERROR: la base y la altura tienen que ser mayor que 0 "}; } else { base = _base; altura = _altura; } This is the code that I have done and when I put a negative value I do not jump error b...
asked by 28.09.2018 / 13:01
2
answers

Convert an array of Integers to an array of Characters with hexadecimal format

I want to convert an integer array to an array of characters by formatting the integers in hexadecimal, then I leave an example of how I do it now, however, I would like an easier way to do it with sprintf, this is because when there are many va...
asked by 23.10.2018 / 00:12
2
answers

What is the library stddef.h for?

I am doing some functions in a program that I have already started, and I see that it has in the header: #include <stddef.h> #include <stdio.h> And I do not understand why to include the library stddef.h since I searched...
asked by 05.04.2018 / 03:03
2
answers

Return a random value from an array

I am trying to get a function to return a random string from an array of strings but it looks like I am not passing the parameters to the function correctly. The problem is in the main.cpp This is my code: Player.h #ifndef PLAYER_H #defi...
asked by 14.06.2018 / 13:26