Questions tagged as 'c++'

1
answer

Free and Total Memory C ++

I am looking for a function to be able to review the total memory and the free memory from DevC ++, applicable in an object-oriented code and that can be used in a class for structures such as Listas and Arboles . If the question...
asked by 28.02.2017 / 06:36
2
answers

C ++ declare data of an array as parameter

Let's say I have this: string opciones[] = { "Registrar estudiante", "Consultar estudiante", "Eliminar estudiante", "Atras" }; and I have a function like this: construir(string titulo, string opcion...
asked by 22.02.2017 / 18:54
1
answer

C ++ fix problem

I am entering by passing a char to an array of char and when inserting it does it well, as I enter and print everything from little to little. Then I made another for to show only the arrangement and it turns out that onl...
asked by 02.11.2018 / 21:18
1
answer

Forward list and iterator

I'm looking at how to implement a list of objects in a class: #include<iostream> #include<forward_list> #include <string> using namespace std; class Persona { private: string m_nombre; int m_anios; public: Pers...
asked by 18.10.2018 / 20:41
1
answer

C ++ inheritance problem

was creating a program through inheritance. In the program I have a base class called FiguraGeometrica and from it Polygon is derived, from which Rectangle and Triangle are derived. Then there is the CollectionFiguras class, which has an array o...
asked by 09.10.2018 / 02:52
3
answers

How to look up value in an array without a cycle

I do not have much experience in c ++ and I have the following question: I have an array / vector of N elements, and I have to enter it into a while condition to check if any of its elements equals a constant number k, but the idea is that every...
asked by 13.10.2018 / 01:19
2
answers

Create an array that does not repeat words C ++ strings

I'm doing a program in C ++ that takes words from a .txt file and inserts each one into an array, the problem is that you should NOT repeat any word, and I'm having complications in that part. Currently I'm only working in that part, the menu on...
asked by 13.11.2018 / 05:52
1
answer

C ++ Problem with data entry

My problem is when doing a new process, everything normal until I re-enter the amount of values to be compared, I ignore the entries of the new values or it does so erratically. How can I fix this? This is my code. #include <iostream>...
asked by 08.09.2016 / 21:24
1
answer

Determine if a matrix can be divided into two such that it has the same number of special characters

The following code seeks to determine if an array of size N, composed of "." and "#" can be split in two, such that the number of characters "#" in each piece is the same. The partition must be done horizontally or vertically, it can not be diag...
asked by 08.10.2018 / 03:53
2
answers

How do I decompose a number in an array in c ++?

I made a program that decomposed a number entered an arrangement as long as it was static, it is this: #include<stdio.h> #include<stdlib.h> #include<iostream> #include<string> using namespace std; int main(){ int nu...
asked by 02.10.2018 / 20:53