iterar en map
C
//traditional way (long)
for(map<string,int>::iterator it=m.begin(); it!=m.end(); ++it)
if(it->second)cout<<it->first<<" ";
//easy way(short) just works with c++11 or later versions
for(auto &x:m)
if(x.second)cout<<x.first<<" ";
//condition is just an example of use
Also in C:
- Title
- print variable c
- Category
- C
- Title
- printf("%3d ",XX);
- Category
- C
- Title
- -> operator
- Category
- C
- Title
- declare variable in c
- Category
- C
- Title
- XAudio2 C
- Category
- C
- Title
- Print the number 0 using write()
- Category
- C
- Title
- C/c drop mime
- Category
- C
- Title
- find gcd iteratively
- Category
- C
- Title
- code: 'EADDRINUSE', [0] errno: 'EADDRINUSE', [0] syscall: 'listen', [0] address: '::', [0] port: 5000
- Category
- C
- Title
- how to ascii art in c
- Category
- C
- Title
- compare two chars c
- Category
- C
- Title
- sleep in c programming
- Category
- C
- Title
- c float to int
- Category
- C
- Title
- get a remote branch git
- Category
- C
- Title
- how to download file in powershell
- Category
- C
- Title
- windeployqt example
- Category
- C
- Title
- CL/cl.h: No such file or directory
- Category
- C
- Title
- boolean function c
- Category
- C
- Title
- error: dereferencing pointer to incomplete type
- Category
- C
- Title
- how to open a website in c
- Category
- C
- Title
- get current used proxy windows 7
- Category
- C
- Title
- qtableview get selected row
- Category
- C
- Title
- c matrix sintax
- Category
- C
- Title
- how to remove \n from a string c
- Category
- C
- Title
- array length c
- Category
- C
- Title
- fibonacci in c
- Category
- C
- Title
- docker images command
- Category
- C
- Title
- check if string in string c
- Category
- C
- Title
- link whatsapp to website
- Category
- C
- Title
- assert() in c
- Category
- C
- Title
- c concatenate strings
- Category
- C
- Title
- c isdigit function
- Category
- C
- Title
- arduino digital read
- Category
- C
- Title
- accessing elements of 1d array using pointers
- Category
- C
- Title
- es par
- Category
- C
- Title
- program using if statement in c whether numnber is less eqaul to greater than 50
- Category
- C
- Title
- ModuleNotFoundError: No module named 'cv2'
- Category
- C
- Title
- bubble sort time complexity
- Category
- C
- Title
- how to put a char into a string c
- Category
- C
- Title
- xmlns='' was not expected
- Category
- C
- Title
- how to pass an array value to a pthread in c
- Category
- C
- Title
- typedef vs #define
- Category
- C
- Title
- ‘uint64_t’ was not declared in this scope
- Category
- C
- Title
- arduino digital input pins
- Category
- C
- Title
- a enum data type in c
- Category
- C
- Title
- fibonacci series using recursion
- Category
- C
- Title
- download file by command line windows
- Category
- C
- Title
- bash: apt-add-repository: command not found
- Category
- C
- Title
- conda windows 10 from pip._internal.cli.main import main ModuleNotFoundError
- Category
- C
- Title
- c copy string
- Category
- C
- Title
- c print hello world
- Category
- C
- Title
- time now c
- Category
- C
- Title
- hostbuilder add environment variables
- Category
- C
- Title
- full screen on c
- Category
- C
- Title
- how to rebasde
- Category
- C
- Title
- where is my vimrc
- Category
- C
- Title
- how to convert int in to const char in c
- Category
- C
- Title
- c printf uint32_t
- Category
- C
- Title
- confirm sweet alert
- Category
- C
- Title
- how to free memory in c
- Category
- C
- Title
- matrix c declaration
- Category
- C
- Title
- disable gnu++11 option
- Category
- C
- Title
- declare integer c
- Category
- C
- Title
- ordenar un vector
- Category
- C
- Title
- update ubuntu in terminal
- Category
- C
- Title
- mostrar lista recursiva
- Category
- C
- Title
- reverse function in c
- Category
- C
- Title
- reset c array to zero
- Category
- C
- Title
- ModuleNotFoundError: No module named 'tensorboardX'
- Category
- C
- Title
- chat c socket tcp geeksforgeeks
- Category
- C
- Title
- how to login to another user in powershell
- Category
- C
- Title
- multiplication in c
- Category
- C
- Title
- mediawiki upload size
- Category
- C
- Title
- c allocate array
- Category
- C
- Title
- read a document in c getting name from console
- Category
- C
- Title
- error 403
- Category
- C
- Title
- c vs python
- Category
- C
- Title
- how to check where the last char is in a string c
- Category
- C
- Title
- append to list in c
- Category
- C
- Title
- delete string function in c
- Category
- C
- Title
- select all file from date powershell
- Category
- C
- Title
- calculate max of three numbers using ternary operator in c
- Category
- C
- Title
- how to globally initlailize a struct
- Category
- C
- Title
- latex font sizes
- Category
- C
- Title
- pointer parameter where to put the asterix in C?
- Category
- C
- Title
- too few arguments to function in c
- Category
- C
- Title
- sbatch array set max jobs at once
- Category
- C
- Title
- ModuleNotFoundError: No module named 'easydict'
- Category
- C
- Title
- pangram program in c
- Category
- C
- Title
- read files in c
- Category
- C
- Title
- c producer consumer pthread semaphore
- Category
- C
- Title
- es fibo
- Category
- C
- Title
- first person view unity
- Category
- C
- Title
- diagonales
- Category
- C
- Title
- how to use a pointer as a parameter in c
- Category
- C
- Title
- cantidad de digitos recursiva
- Category
- C
- Title
- vbnet create and write on file
- Category
- C
- Title
- command line arguments c
- Category
- C
- Title
- how to pass an array to a thread in c?
- Category
- C
- Title
- how can i remove a specific item from an array
- Category
- C