Questions tagged as 'c++'

2
answers

Recursive Exponent Failing

I was practicing to be able to make a recursive exponent, and it works but not with doubles and floats , I do debugging and I get warnings in the implementation of C ++. It's a very long follow-up but in the end I get the next outpu...
asked by 17.09.2017 / 05:07
3
answers

C ++ random number generator

The problem is the following I have my code in which it generates 10 random numbers in an array, then shows them and then orders them, what I want is that when I re-execute the "fill" function that is the that generates the numbers an arrangemen...
asked by 25.09.2017 / 20:31
1
answer

Problem with while loop: does not work or

The or does not work in this while loop: #include <iostream> using namespace std; main () { char s; do{ cout<<"\n\t\t> Ingrese el sexo: "; cin>>s; }while (s!='f' || s!='m'); return 0; }    ...
asked by 23.08.2016 / 18:20
2
answers

Map within another Map

I'm trying to access a map that is contained in another map , but I get an error. The code is as follows: map<string, map<string, list<string>>>::iterator iter; map<string, list<string>>::iterator...
asked by 06.06.2017 / 17:30
1
answer

Call a function every x seconds

I'm doing a console application in VS2008. I have a function that I have to call it every 5 seconds, but until those 5 seconds pass the program has to keep running. I have tried to use thread, but I can not include it because my version of c ++...
asked by 17.07.2017 / 11:44
2
answers

How to join in a constructor three constructors with different signatures?

I have three constructors of a simple class A with different signatures but I wanted to make a single constructor that brings together the three constructors: using namespace std ; class A { private : int x, y; public : A();...
asked by 08.02.2017 / 13:49
2
answers

How to use a class as a type of a function external to the class?

How to use a type of a class inside a function external to the class? For example let's use this example of mathematics. I want to create a class abtracts Bola with two attributes and a function contiene that tells me if a point...
asked by 19.02.2017 / 11:38
1
answer

Convert a string to char in c ++

I have this structure and I need that in the name field I can enter a data, but I have that data in a string. typedef struct cliente{ int cedula; int numCuenta; char nombre[100]; cliente *izq, *der; }cliente;     
asked by 27.02.2017 / 16:55
3
answers

Error executing the program in c ++ of arrays

I go back to the community in search of help and learn, the code is not finished but when compiling and executing, when I do the test it throws me an error, can someone tell me what is wrong ?, in the faculty I made the same code and in the vers...
asked by 05.06.2016 / 09:10
5
answers

is there any way for an _array_ to have all the VARIABLES have the same initial value?

There is some way for an array to have all VARIABLES have the same initial value without using a FOR or WHILE loop. here is an example of how I managed it with a FOR loop. #include<iostream> using namespace std; int main(){ int...
asked by 15.06.2016 / 00:21