Questions tagged as 'c++'

2
answers

Error: invalid conversion from 'int' to 'int * (*) [4]' [- fpermisive] C ++

I have to make a 4x4 matrix, then load the main diagonal with zeros and show it, so that finally I count the multiples of 5 in it. I want to send the matrix by reference , in order to modify the original from the diagonalpp function. It is impo...
asked by 01.12.2018 / 15:19
1
answer

The entered data is not displayed

I have a Garito class in which I have implemented a series of setters and getters to be able to interact with their content. Apart I have some functions that access these methods to show the data. I have managed to show them using parameterized...
asked by 22.06.2018 / 16:02
1
answer

Operator comparison operator == [closed]

I'm trying to make a comparison operator but I do not know how to approach it. The idea is that you can use the == operator to compare two objects of the same class, for example, I have this rational class: class Racional{ private: int...
asked by 20.09.2018 / 00:05
1
answer

How to make an arrangement of objects within another class? c ++

I need to make an arrangement of size 10 objects within a different class, The only way I know how to do it is this: (B is another class) class A { private: B arreglo[10]; public: A(); A(string, int, B arreglo[10]); }; T...
asked by 19.09.2018 / 20:30
1
answer

Error: the object has type qualifiers that are not compatible with the function

I have a Rational class: class Racional { private: int m_numerador; int m_denominador; public: Racional(); Racional(int numerador, int denominador); void setNumerador(int numerador); void setDenominador(int denominad...
asked by 19.09.2018 / 00:34
1
answer

Catch exception divide by zero

I need to catch the exception divided by zero in C ++. I was reading that exceptions like this one are not defined in C ++; I saw some examples but they use signal() , in others they use the throw() and the truth is that it confused...
asked by 01.07.2018 / 05:27
1
answer

Limit user input to certain characters

This is the implementation for a program that basically converts from DNA to RNA. The bases can only be GTAC, and when transcribed is GUAC, or just change the T for the U. How to do so that when the user inserts other letters that are not those...
asked by 29.05.2018 / 22:51
2
answers

Help with binary tree

Dear stack overflow friends. The present is to request collaboration in the last cut project, I must make a binary tree that saves people with their age, I already have an advanced code, but I have an error when assigning the new_node-> field...
asked by 17.05.2018 / 19:46
1
answer

C ++ inventory system

I'm doing a program in c ++ that consists of an inventory system, I'm asked for the following menu: Enter an article Edit an article Delete an article List the inventory List inventory of depleted products Exit the program For n...
asked by 08.05.2018 / 03:02
1
answer

Matrix with changing data and time steps

I have trouble writing a program that must calculate the temperature of a central point of a rectangular region after certain time steps. For which you create a matrix of (N + 1) x (M + 1) where N = 2M and the center point of the region is (N...
asked by 29.03.2018 / 11:52