Dima
thx
Dani
Rose is so effective. I'd hire her If I could :)
Dima
go back to work now
Anonymous
Rose could be my ai gf
Anonymous
Who never replies, not lonely at all😄
Roxifλsz 🇱🇹
Ok so I found a GUI toolkit that I have never seen before, it's called IUP http://webserver2.tecgraf.puc-rio.br/iup/ Any people here who have used it, and is it any good?
Anonymous
friend please some one help me
Anonymous
i need combo
Anonymous
for sentry mba
Anonymous
Anonymous
combolist please
Anonymous
this is no 1337 h4ck3rs telegram...
Roxifλsz 🇱🇹
And that
Roxifλsz 🇱🇹
Woah, Dima left me hanging
Anonymous
🤦‍♀️🤦‍♀️🤦‍♀️
Anonymous
🙏
Roxifλsz 🇱🇹
This
And that
Roxifλsz 🇱🇹
Ritwik
#findproject
Ritwik
#findprojects
Ritwik
#best - book
Anonymous
🐰🐾 سمیه
Hi friends, would you please explain the highlighted section to me?
Pavel
Hi friends, would you please explain the highlighted section to me?
What exactly is not clear? The author says about switch-case statement and break instruction in it.
🐰🐾 سمیه
The highlighted part.
🐰🐾 سمیه
It is saying about advantages and disadvantages of switch statement.
Anonymous
The highlighted part.
I got that part.. it's saying what "break" does.. that is breaking from the case and going back to original loop
🐰🐾 سمیه
But I'm not getting it. Particularly the disadvantages.
Pavel
It is saying about advantages and disadvantages of switch statement.
No, he says about advantages and disadvantages of not having break instruction (to fall through cases).
Anonymous
But I'm not getting it. Particularly the disadvantages.
It saying you need to break break break break break break.. like dog sound on every use case xD
Anonymous
What happens if we don't have it?
It will execute next cases (untill there is a break) with previous conditions no matter what
Pavel
What happens if we don't have it?
Then the nex case will be executed as well. It's a frequent mistake when someone forget a break and two or more cases get executed
Anonymous
😂
Pavel
So as the author says, if you want this "fall through" behavior then you should make it clear that this is not a mistake (make a comment for it)
🐰🐾 سمیه
I gotit thanks
🐰🐾 سمیه
What does this part in the picture says? Falling through from one case to another is not robust, being prone to disintegration when the program is modified. With the exception... should be used sparingly and commented.
Mihail
What does this part in the picture says? Falling through from one case to another is not robust, being prone to disintegration when the program is modified. With the exception... should be used sparingly and commented.
It is saying that if you do use this behavior, then making code changes would require more effort as you might have to re-structure the switch statement
Mihail
And it could cause some small potentially hard to find bugs
🐰🐾 سمیه
True, and would you please explain the last sentence from " with the exception..."?
Mihail
True, and would you please explain the last sentence from " with the exception..."?
Well it says that you shouldn't use it much and that you should comment it whenever you do
Pavel
True, and would you please explain the last sentence from " with the exception..."?
Well, if you have code with multiple consequent case labels like this switch (direction) { case Up: case Down: ProcessVertical(); break; case Left: case Right: ProcessHorisontal(); break; default: } it's pretty clear that you merged the cases intentionally. So it usually does not require adding a comment.
🐰🐾 سمیه
Well it says that you shouldn't use it much and that you should comment it whenever you do
In the past paragraph, what he means by the word "at the end" in: Some day when another case gets added at the end? Is it after the default or before the default? Can we add another case after the default?
Pavel
if you have label, then some code, then label, then break, then you surely need a comment also there's a special attribute for this now https://en.cppreference.com/w/cpp/language/attributes/fallthrough
Pavel
In the past paragraph, what he means by the word "at the end" in: Some day when another case gets added at the end? Is it after the default or before the default? Can we add another case after the default?
He means when another case added at the end (but it can be added in the middle as well). It doesn't matter before or after default. As I know it can be in any order, but usually default expected to be the last one. Detalied: https://stackoverflow.com/questions/3110088/switch-statement-must-default-be-the-last-case
Pro
Out of the topic Fibonacci series code for 8086 assembly
Pro
Anybody?
Pavel
In other cases falling through should be commented (or better avoided)
🐰🐾 سمیه
So such cases is the exception that he mentioned
What has made it an exception? It's similar to the on in the book.
Pavel
What has made it an exception? It's similar to the on in the book.
Well in the exemple almost the same (good) use case. A bad example may look like this: switch (expr) { case 0: i = 4; f(i); case 1: i = 17; default: printf("%d\n", i); } You can't say looking at this code whether breaks was dropped intentionally or by mistake. Also if a person reads it fast they may not mention breaks missed and make a false assumption of what this code does. In the case the breaks wasn't needed here, the comments should be added (or the code be rewritten).
Dima
And that
this!!!
🐰🐾 سمیه
Thanks you very much Pavel 🌷
🐰🐾 سمیه
Anonymous
hey bros, how i clean the current clipboard with c++/qt?
Anonymous
mi code is here
Anonymous
generator = QGuiApplication::clipboard(); QMimeData *d = new QMimeData(); Data = header + completeData + footer; d->setHtml(Data); generator->setMimeData(d);
Anonymous
🐰🐾 سمیه
Hi, this example is for c++. Is it also true and applicable for C?
🐰🐾 سمیه
It's about fallthrough statement.
Mat
Hi, this example is for c++. Is it also true and applicable for C?
It's a C++17 feature. I suppose you can't use it in C🤔
Mat
Without fallthrough it should compile
🐰🐾 سمیه
It's a C++17 feature. I suppose you can't use it in C🤔
I don't know, if you found it out, let me know please.
Dani
Everytime I blink, I find something new in std namespace. For example, std::function
Dima
std::thread is a battle royale
Dani
Is there any way to know the whole list of what's on the whole std namespace?
Dima
cpp reference
Mihail
more like a book tbh
Dani
Mm.. In fact, I guess I can declare something on std if I want, in my libarary, right?
Dani
Can I somehow search for it or grep it in /usr/include?
Mihail
Like why would you?