Questions tagged as 'c++'

2
answers

I want to be in a WHILE loop until I stop writing to a Char in C ++

I want to read a text infinitely until I stop writing, and count the vowels. But I stop writing and I do not leave the WHILE loop, why? Thanks for the help :) Here I leave the code: unsigned aCnt = 0, eCnt = 0, iCnt = 0, oCnt = 0, uCnt = 0; ch...
asked by 10.09.2018 / 13:39
2
answers

Random_shuffle: Show the shuffled items on the screen

The explanation that comes in cplusplus is difficult for my understanding and I can not understand how this function works (random_shuffle). How to show the shuffled array? Any failure to emphasize? #include<iostream> #include<cstdlib...
asked by 24.02.2018 / 23:02
1
answer

error when converting FILE * to const char

Hello, I do not understand why I have an error (the one I mention in the title) on the next line const char* filename = InFile; the code is a bit extensive I'll leave the main int main(int argc, char * argv[]){ FILE* InFile = fopen(ar...
asked by 19.02.2018 / 06:11
3
answers

Help c ++ threads Pause and Resume

I'm new to this c ++, this code I did practically with the help of internet pages.  I would like to know how I can pause and resume two threads, that when I start a thread A I reach a point where it stops, then the other thread B starts and reac...
asked by 25.11.2016 / 21:28
2
answers

Move through the fields of a C / C ++ record without using its name

Is it possible to move through the fields of a C / C ++ registry without knowing its name or the size of these in memory? that is, suppose we have: struct Ejemplo{ int a; int b; int c; int d; ... int z; }; struct Ejemp...
asked by 21.11.2016 / 13:08
1
answer

How to eliminate the "waste" of a stringstream?

While trying to resolve this issue with this answer I found myself with the problem that I can not eliminate the "residuals" that remain after using stringstream and I wanted to ask them if they can advise me on how to eliminate the g...
asked by 04.11.2016 / 00:44
3
answers

doubt about Vectors

By solving this problem    Do a function with header       vector flattens (vector const & v); who receives several   vectors and concatenates them in order. For example, if the function receives   Vector vector       [[1, 2, 3], [4, 5...
asked by 28.11.2016 / 23:36
1
answer

Crashea program from nowhere C ++ [closed]

I have a problem with a software developed in C ++, I was many things and being running for 2 or 3 hours the program produces error and closes, the error that shows me is the following but I can not understand what is ...     
asked by 20.10.2018 / 07:22
2
answers

Help, compile error using string inside a switch in c ++

I greet you, I just started to program and I find this problem "[Error] 'binary1' was not declared in this scope" is a string inside a switch, a string seemed outside the switch works for me, but not inside , if you can help me. The code is not...
asked by 18.05.2016 / 10:11
1
answer

Qt Tree View with Checboxes

I modified the example of the Qt website: EditableTreeModel Example so that in the tree view I get CheckBoxes next to each Item. But ... How can I make them dependent on each other? That is, if the parent's ChechBox is selected automatica...
asked by 21.11.2018 / 15:03