#define CLEAR_BUFFER while ( getchar ( ) != ’ \n ’ )
Enigma
Anonymous
Can anyone tell me how to iterate through a map using auto in reverse order without any pain?
for (auto iter = my_map.crbegin(); iter != my_map.crend(); ++i)
Langmop
Can anyone help me in linked list iam new to it and getting segmentation error
Anonymous
for (auto iter = my_map.crbegin(); iter != my_map.crend(); ++i)
Is there any difference b/w my_map.rbegin() and my_map.crbegin()? Although, I wanted it like for(auto &x : my_map) but in reverse manner.
Anonymous
and we cannot change the value like iter->second = some_value?
Anonymous
And c++20 is latest?
C++20 is not released yet
Timothy
And c++20 is latest?
yes, we are in 2019, 2020 is next year
Anonymous
And c++20 is latest?
C++17 is the latest
Anonymous
Why don't u just use a reverse iterator?
why so we use for(auto &x:mp)
Anonymous
Ghost🔥
Ok then you can just reverse the map B4 using it in a for each loop
Anonymous
why so we use for(auto &x:mp)
It is available since c++20 by Ranges Technical Specification
Ghost🔥
Anonymous
Use std::move ()
Whaaaaaat😂😂😂😂😂
Anonymous
Use std::move ()
Can you give a code snippet? I would love to see it working
Anonymous
Use std::move ()
Do you even understand what std::move does?
Ghost🔥
U ust move it to another map but u start with end to begin
Anonymous
A Map internally uses tree like structure and how to you reverse it?
Anonymous
Can you give a code snippet? I would love to see it working
Don't listen to him, he is talking nonsense
Anonymous
Don't listen to him, he is talking nonsense
I know. Just want to see how people have nice ideas about things that they don't know.
Anonymous
Use reverse iterators and that's it
Anonymous
Anonymous
Yeah sadly that's the only way.
Anonymous
I checked it but something "boost" came up and I put down the idea.
Anonymous
reverse adaptors
Anonymous
https://stackoverflow.com/questions/732160/how-to-iterate-in-reverse-over-a-map-in-c
Anonymous
1st answer
Anonymous
Well, it's boost
Anonymous
Not a standard c++
Anonymous
But the similar thing will be in C++20
RK
/opencv
RK
/opencv
Anonymous
How to multiply two numbers which have a base system other than 10 without converting them to decimal system?
Artöm
More info
Ghost🔥
There's no way
Just to prove ur lack of creativity I just created a function which reverses a map
Anonymous
Ghost🔥
Hahaha I admit it's stupid but u guys said it's impossible so I copied the elements from a map to a list<std::pair<datatype,datatypa>> then I clear the map an then reverse the list then copy the elements back to the map🤦‍♂
Anonymous
Ghost🔥
..
Anonymous
..
Dude, if you can't read, it is your problem
Ghost🔥
Code it buddy.
Give me 5mins
Anonymous
...
No one asked you how to move something
Artöm
After all the shit you did to it
Ghost🔥
😂😂😂Damn it i get it now..
Ghost🔥
If possible just use vector<pair<datatype, datatype>> and save ur self some pain
I_Interface
How to multiply two numbers which have a base system other than 10 without converting them to decimal system?
Read about bite operations(if it is) or watch videos about the base what do you need.
Anonymous
https://paste.ubuntu.com/p/y4SpCBPgq2/
Anonymous
If possible just use vector<pair<datatype, datatype>> and save ur self some pain
Please, if you don't know what you're talking about, just say nothing
Anonymous
Why
The question was how to iterate MAP in reversed order You're talking about std::move, vectors...
Ghost🔥
Yeah I meant it as an alternative if it suited his needs thats y I said if 'posible' bcoz he wanted to use for(auto:container)
Anonymous
@admin can I promote my group
Anonymous
Please
Anonymous
/report
Talula
Can anyone help me in linked list iam new to it and getting segmentation error
It could be that you’re not allocating right about of memory for storing the information.
Talula
How to multiply two numbers which have a base system other than 10 without converting them to decimal system?
To do this your you’ll have to write actual way to add things in this new system, but computer actually works in binary that means it only works with 0 or 1 it doesn’t know 10 base or 16 base. Convert 16 base to 10 base do calculation and convert result back to 16 base or whatever.
Talula
/report
Anonymous
no.
So sad okay I will not