Questions tagged as 'c++'

5
answers

cycle for does not stop

This code is wrong and I do not know why, I want to do a array[5]={1,2,3,4,5,6} and show it on the screen. int main(void){ int arr[5]; arr[0]=1; arr[1]=2; arr[2]=3; arr[3]=4; arr[4]=5; arr[5]=6; for(int...
asked by 21.10.2016 / 07:14
2
answers

How to print repeated elements of a std :: list in C ++ without using loops?

How do I print all the elements of a list (std :: list) of pairs in c ++, containing max_elemnt repeated ? list<pair<int, int>> l; l.push_back ( std::make_pair ( 1, 90 ) ); l.push_back ( std::make_pair ( 2, 90 ) ); l...
asked by 02.09.2016 / 15:02
1
answer

Problems using cin.ignore ();

What I want to do with cin.ignore(256,'\n'); is to clean the keyboard buffer, so that in the 2nd loop while can enter the data. But the monento execute it I realize I have not achieved my goal, and because of my inexperience I d...
asked by 20.08.2016 / 00:40
1
answer

how do I use a string in a struct to decide which data to show?

good. My question is to know how to use the string shows to decide which part of body to show. ex: if you enter "name" show me your name. #include<iostream> using namespace std; struct vector2d{ double x,y; }; struct cuerpo{...
asked by 03.08.2016 / 01:57
1
answer

Play song after song with MciSendString, "problem" with "wait"

Good morning, I want my code to be able to play one song after another, I managed to do it with "wait", but the problem is that I do not want to "freeze" the program while it is running the mp3, but it is available for the other functions like "...
asked by 08.07.2016 / 21:10
2
answers

Use of linked lists in Win32 (winapi) C ++

Good morning, I would like to know how to use double linked lists in Winapi, more specifically, where to initialize the list? and within the CALLBACK, how to use the list? (or simply by declaring it in the right place can it be used without prob...
asked by 07.06.2016 / 04:25
1
answer

why does not this program work?

It is assumed that typeat template should return the type of between Differs types included in a container called Cons It's from the book advanced metaprogramming g ++ v4.9 tdm windows #include <iostr...
asked by 04.04.2017 / 23:43
2
answers

Reading files in c ++

I have a Store class with a method to read users of a file: void Store::leerUsuarios(const string &nombreFichero){ ifstream fichero; fichero.open(nombreFichero); if (fichero.is_open()) { string nom, mail, contrasenya; while (!...
asked by 26.05.2018 / 02:17
2
answers

Transposition of Columns into a Matrix in c ++

Hello, I have a char array initialized as follows: #include <iostream> using namespace std; main(){ char matriz[6][5]={ {'F','H','V','D','U'}, {'E','L','Q','U','E'}, {'P','E','R','S','E'}, {'V','E','R','A','A'}, {'L','C','A','N','...
asked by 28.03.2016 / 21:24
2
answers

I can not delete a file in c ++

I need to delete the original file and leave the other file copy to rename it with the name of the original file, but I do not know why it does not work for me. I would appreciate your help. remove("Fichero.txt"); rename("Temp.txt","Fichero...
asked by 29.11.2018 / 05:34